Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleExample
Code Block
themeEclipse
languagejava
titleMYPLUGINCRMBOContactInformationBean.java
@Stateless
@LocalBean
public class MYPLUGINCRMBOContactInformationBean extends CRMBase implements CRMBOHook{
   
    public MYPLUGINCRMBOContactInformationBean() {
        // TODO Auto-generated constructor stub
    }
	@Override
	public CRMDO afterConstruct(CRMDO dto) throws Exception {
		//CRMDOContactInformation TODOcontactInformation Auto-generated method stub= (CRMDOContactInformation) dto;
		return dto;
	}
	@Override
	public CRMDO beforeSave(CRMDO dto) throws Exception {
		// TODO Auto-generated method
stub
		return dto;
	}
	@Override
	public CRMDO afterSave(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO beforeValidateOnSave(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO afterValidateOnSave(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO beforeValidateOnDelete(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO afterValidateOnDelete(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO beforeDelete(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO afterDelete(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
	@Override
	public CRMDO afterLoad(CRMDO dto) throws Exception {
		// TODO Auto-generated method stub
		return dto;
	}
Code Block
themeEclipse
languagexml
titlehooks.xml
<hookconfig>
	<hooks>
		...
		<hook>
			<serviceclass>CRMBOContactInformationBean</serviceclass>
			<interfacename>CRMBOHook</interfacename>
			<implementationclass>MYPLUGINCRMBOContactInformationBean</implementationclass>
		</hook>
	</hooks>
</hookconfig>

...

Expand
titleExample
Code Block
themeEclipse
languagejava
titleMYPLUGINCRMProcessServiceRequestBean.java
@Stateless
@LocalBean
public class MYPLUGINCRMProcessServiceRequestBean extends CRMProcess implements CRMProcessServiceRequestHook{
       
    public MYPLUGINCRMProcessServiceRequestBean() {
        super();
        // TODO Auto-generated constructor stub
    }
	@Override
	public CRMDOServiceRequest beforeCreate(CRMDOServiceRequest serviceRequest) throws Exception {
		serviceRequest.setUserField1("beforeCreate() hook test");
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterCreate(CRMDOServiceRequest serviceRequest) throws Exception {
		serviceRequest.setUserField2("afterCreate() hook test");
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeComplete(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return nullserviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterComplete(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeFinalAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterFinalAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeFinalResolve(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterFinalResolve(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeRespond(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO
Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterRespond(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeResponseAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterResponseAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated
method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeTemporaryAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterTemporaryAccept(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeTemporaryResolve(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterTemporaryResolve(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest beforeUpdate(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
	@Override
	public CRMDOServiceRequest afterUpdate(CRMDOServiceRequest serviceRequest) throws Exception {
		// TODO Auto-generated method stub
		return serviceRequest;
	}
}
Code Block
themeEclipse
languagexml
titlehooks.xml
<hookconfig>
	<hooks>
		...
		<hook>
			<serviceclass>CRMProcessServiceRequestBean</serviceclass>
			<interfacename>CRMProcessServiceRequestHook</interfacename>
			<implementationclass>MYPLUGINCRMProcessServiceRequestBean</implementationclass>
		</hook>
	</hooks>
</hookconfig>

...