fferpcore.RegistrationServiceglobal with sharing class RegistrationService This class is the initial entry point into Foundations. Products must create at least one RegistrationRequest in order to register a product with Foundations. When a RegistrationRequest has been created, publications and subscriptions can be added to that request to create these objects inside Foundations. Methods
registerProductglobal static void registerProduct(fferpcore.RegistrationService.RegistrationRequest request) Register a Foundations Product with all of its potential subscriptions and publications. If the product is already registered then the registration will be updated as for an upgrade. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } unregisterProductglobal static void unregisterProduct(String developerName) Remove a product, its publications and subscribers. It may not be possible to remove all rows due to referential integrity. In this situation the product and any remaining publications/subscribers need to be marked as obsolete. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class HCMUninstall implements UninstallHandler { global void onUninstall(UninstallContext context) { fferpcore.RegistrationService.unregisterProduct('HCM'); } } fferpcore.RegistrationService.RegistrationRequestglobal inherited sharing class RegistrationRequest A request to register a Linked Product with Foundations. Methods
RegistrationRequestglobal RegistrationRequest(String developerName, String name, System.Version version) Constructor that specifies the developer name, name and version for a product we want to register with Foundations. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withProductProxyglobal fferpcore.RegistrationService.RegistrationRequest withProductProxy(String productProxy) This fluent method is used to specify a product proxy developer name associated with all publications and subscriptions for this product. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } getDeveloperNameglobal String getDeveloperName() Return ValueThe developer name associated with the product this registration represents. getNameglobal String getName() Return ValueThe name associated with the product this registration represents. getVersionglobal Version getVersion() Return ValueThe version number associated with the product this registration represents. getPublicationRequestsglobal List<fferpcore.RegistrationService.PublicationRequest> getPublicationRequests() Return ValueAny publications requests associated with this registration. getSubscriptionRequestsglobal List<fferpcore.RegistrationService.SubscriptionRequest> getSubscriptionRequests() Return ValueAny subscriptions requests associated with this registration. getProductProxyglobal String getProductProxy() Return ValueThe product proxy name associated with this registration. addPublicationglobal fferpcore.RegistrationService.PublicationRequest addPublication(String messageTypeDeveloperName) This fluent method is used to add a publication request. When the RegistrationRequest is registered with Foundations this PublicationRequest will become a Publication object associated with the linked product specified in this registration request. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } addSubscriptionglobal fferpcore.RegistrationService.SubscriptionRequest addSubscription(String messageTypeDeveloperName, Type messageHandler) This fluent method is used to add a subscription request. When the RegistrationRequest is registered with Foundations this SubscriptionRequest will become a Subscription object associated with the linked product specified in this registration request. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } fferpcore.RegistrationService.PublicationRequestglobal inherited sharing class PublicationRequest A request to register a publication with Foundations. Methods
PublicationRequestglobal PublicationRequest(String messageTypeDeveloperName) Constructor that specifies which message type this publication will be associated with. Input Parameters
withDescriptionglobal fferpcore.RegistrationService.PublicationRequest withDescription(String value) This fluent method is used to specify a description for this publication when registered with Foundations. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withDocumentationUrlglobal fferpcore.RegistrationService.PublicationRequest withDocumentationUrl(String value) This fluent method is used to specify a URL pointing to this publications online help page. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withDescriberglobal fferpcore.RegistrationService.PublicationRequest withDescriber(Type describer) This fluent method is used to specify a describer for this publication when registered with Foundations. The describer class specifies the structure of the messages sent from this publication. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withIdentifierglobal fferpcore.RegistrationService.PublicationRequest withIdentifier(String identifier) This fluent method is used to specify a identifier associated with this publication. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withSendingHookglobal fferpcore.RegistrationService.PublicationRequest withSendingHook(Type sendingHook) Specifies the sending hook responsible for delivering the messages. Input Parameters
Return ValueThe PublicationRequest. This enables other methods to be invoked. withReplacedIdentifierglobal fferpcore.RegistrationService.PublicationRequest withReplacedIdentifier(String identifier) Specifies the identifier of an existing publication, which is to be overridden. Input Parameters
Return ValueThe PublicationRequest. This enables other methods to be invoked. withMessageTypeDescriptionglobal fferpcore.RegistrationService.PublicationRequest withMessageTypeDescription(String description) Specifies a description for the message type. This is only used if the message type does not currently exist or does not have a description. Input Parameters
Return ValueThe PublicationRequest. This enables other methods to be invoked. withVirtualObjectglobal fferpcore.RegistrationService.PublicationRequest withVirtualObject(String virtualObject, String provider) Specify the associated virtual object and provider. Input Parameters
Return ValueThe PublicationRequest. This enables other methods to be invoked. withSourceObjectglobal fferpcore.RegistrationService.PublicationRequest withSourceObject(String sourceObject) Specify the associated source object. For example, Account. Input Parameters
Return ValueThe PublicationRequest. This enables other methods to be invoked. getMessageTypeDeveloperNameglobal String getMessageTypeDeveloperName() Return ValueThe developer name associated with the message type assigned to this publication. getMessageTypeDescriptionglobal String getMessageTypeDescription() Return ValueThe description of the message type associated with this publication. getDescriptionglobal String getDescription() Return ValueThe description assigned to this publication. getDocumentationUrlglobal String getDocumentationUrl() Return ValueThe documentation url assigned to this publication. getDescriberglobal Type getDescriber() Return ValueThe describer class assigned to this publication. getIdentifierglobal String getIdentifier() Return ValueThe identifier associated with this publication request. getSendingHookglobal Type getSendingHook() Return ValueThe class responsible for delivering the messages. isReplacementglobal Boolean isReplacement() Return ValueA boolean value that indicates whether this publication is to override an existing publication. getReplacedIdentifierglobal String getReplacedIdentifier() Return ValueThe identifier of an existing publication, which is to be overridden. getVirtualObjectProviderglobal String getVirtualObjectProvider() Return ValueThe source of the data used to generate the virtual objects. fferpcore.RegistrationService.SubscriptionRequestglobal inherited sharing class SubscriptionRequest A request to register a subscription with Foundations. Methods
SubscriptionRequestglobal SubscriptionRequest(String messageTypeDeveloperName, Type messageHandler) Constructor that specifies which message type this subscription will be associated with and which class will be invoked when this subscription receives messages. Input Parameters
withExcludeFromSelfglobal fferpcore.RegistrationService.SubscriptionRequest withExcludeFromSelf(Boolean value) Input Parameters
withDeliveryOrderglobal fferpcore.RegistrationService.SubscriptionRequest withDeliveryOrder(Integer value) Use within a product to ensure dependent messages are delivered in the right order, for example Skills after Workers so a Worker exists before Skills are added to it. Input Parameters
withDescriptionglobal fferpcore.RegistrationService.SubscriptionRequest withDescription(String value) This fluent method is used to specify a description for this subscription when registered with Foundations. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withDocumentationUrlglobal fferpcore.RegistrationService.SubscriptionRequest withDocumentationUrl(String value) This fluent method is used to specify a URL pointing to this subscriptions online help page. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withHandlerDataglobal fferpcore.RegistrationService.SubscriptionRequest withHandlerData(String value) This fluent method is used to specify handler data for this subscription when registered with Foundations. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withBulkCapacityglobal fferpcore.RegistrationService.SubscriptionRequest withBulkCapacity(Integer value) This fluent method is used to specify the number of messages can be received at once during a batch job for this subscription when registered with Foundations. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withSynchronousCapacityglobal fferpcore.RegistrationService.SubscriptionRequest withSynchronousCapacity(Integer value) This fluent method is used to specify the number of messages that can be received at once during synchronous operation. The subscription is enabled for automatic switching to batch delivery when the number of messages exceeds this threshold. withDescriberglobal fferpcore.RegistrationService.SubscriptionRequest withDescriber(Type value) This fluent method is used to specify the describer for this subscription when registered with Foundations. The describer class specifies the information this subscription looks for when it receives a message. Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withIdentifierglobal fferpcore.RegistrationService.SubscriptionRequest withIdentifier(String identifier) This fluent method is used to specify a identifier associated with this subscription. This identifier cannot be the same for any 2 subscriptions: Input Parameters
Sample Code//Note: This sample code is for demonstration purposes only. It is not intended for //use in a production environment, is not guaranteed against defects or errors, and //is in no way optimized or streamlined. global without sharing class ClickLinkInstall implements InstallHandler { global void onInstall(InstallContext context) { fferpcore.RegistrationService.RegistrationRequest request = new fferpcore.RegistrationService.RegistrationRequest('HCM', 'HCM Name', new Version(1, 0, 0)). withProductProxy('ClickLink'); request.addPublication('Resource.Update'). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withDescriber(ThisPublicationsDescriber.class). withIdentifier('HCM_FakeWorker__c'); request.addSubscription('Resource.Update', YourHandlerClass.class). withExcludeFromSelf(true). withDeliveryOrder(1). withDescription('I handle the Resource.Update message type for the HCM_FakeWorker__c object.'). withDocumentationURL('http://financialforce.com'). withHandlerData('I am handler data'). withBulkCapacity(500). withDescriber(ThisSubscriptionsDescriber.class). withIdentifier('HCM_FakeWorker__c'); fferpcore.RegistrationService.registerProduct(request); } } withAutomaticLinkControlOnExceptionglobal fferpcore.RegistrationService.SubscriptionRequest withAutomaticLinkControlOnException(String errorLinkDeveloperName, fferpcore.RegistrationService.PublicationRequest errorPublication) This fluent method is used to specify a publication and link control developer name (id) on which to send error details if an exception is thrown from the delivery handler. Input Parameters
withMessageTypeDescriptionglobal fferpcore.RegistrationService.SubscriptionRequest withMessageTypeDescription(String description) Specifies a description for the message type. This is only used if the message type does not currently exist or does not have a description. Input Parameters
Return ValueThe SubscriptionRequest. This enables other methods to be invoked. withVirtualObjectglobal fferpcore.RegistrationService.SubscriptionRequest withVirtualObject(String targetObject, String consumer) Specify the associated target object and consumer. Input Parameters
Return ValueThe SubscriptionRequest. This enables other methods to be invoked. getMessageTypeDeveloperNameglobal String getMessageTypeDeveloperName() Return ValueThe developer name of the message type associated with this subscription. getMessageTypeDescriptionglobal String getMessageTypeDescription() Return ValueThe description of the message type associated with this subscription. getMessageHandlerglobal Type getMessageHandler() Return ValueThe message handler class which will be invoked when this subscription receives a message. isExcludeFromSelfglobal Boolean isExcludeFromSelf() Return ValueWhether or not this subscription will receive messages from a publication which sends messages on the same message type in the same product. getDeliveryOrderglobal Integer getDeliveryOrder() Return ValueThe order that this subscription will receive messages in. getDescriptionglobal String getDescription() Return ValueThe description assigned to this subscription. getDocumentationUrlglobal String getDocumentationUrl() Return ValueThe documentation url assigned to this subscription. getHandlerDataglobal String getHandlerData() Return ValueThe handler data assigned to this subscription. getBulkCapacityglobal Integer getBulkCapacity() Return ValueThe bulk capacity assigned to this subscription. getDescriberglobal Type getDescriber() Return ValueThe describer class assigned to this subscription. getIdentifierglobal String getIdentifier() Return ValueThe identifier associated with this publication request. getErrorPublicationglobal fferpcore.RegistrationService.PublicationRequest getErrorPublication() Return ValueThe error publication assigned to this subscription. getErrorLinkDeveloperNameglobal String getErrorLinkDeveloperName() Return ValueThe error link control developer name with this publication request. getSynchronousCapacityglobal Integer getSynchronousCapacity() Return ValueThe synchronous capacity before the subscription receives delivieries in batch. getVirtualObjectConsumerglobal String getVirtualObjectConsumer() Return ValueThe name of the consumer. Used on corresponding VirtualDataObjectTargetMapping records. |