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. Once these requests have been created, then they must be registered with Foundations using the registerProduct method. This should be done inside your install hook. If you wish to uninstall a product and all related publications and subscriptions use the unregisterProduct method. This should be done inside your uninstall hook.
global 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.
global 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
Name
Type
Description
developerName
String
The name of the product to remove.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
//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 classHCMUninstall implementsUninstallHandler
global 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
Name
Type
Description
messageTypeDeveloperName
String
The developer name of a the message type we want to associate this publication with.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global 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
Name
Type
Description
messageTypeDeveloperName
String
The developer name of a the message type we want to associate this subscription with.
messageHandler
Type
The class which will be called when this subscription receives messages.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global PublicationRequest(String messageTypeDeveloperName)
Constructor that specifies which message type this publication will be associated with. This method should not be called directly as it will be called implicitly when a RegistrationRequest adds a publication.
Input Parameters
Name
Type
Description
messageTypeDeveloperName
String
The message type this publication will be associated with.
global 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
Name
Type
Description
describer
Type
The describer class for this publication.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global fferpcore.RegistrationService.PublicationRequest withIdentifier(String identifier)
This fluent method is used to specify a identifier associated with this publication. This identifier cannot be the same for any 2 publications: - With the same Product - With the same fferpcore.Message Type - With the same Product Proxy
Input Parameters
Name
Type
Description
identifier
String
Used to set the identifier field on a publication.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global 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. This method should not be called directly as it will be called implicitly when a RegistrationRequest adds a subscription.
Input Parameters
Name
Type
Description
messageTypeDeveloperName
String
The message type this subscription will be associated with.
messageHandler
Type
The class which will be invoked when the subscription receives a messages.
global 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
Name
Type
Description
value
Integer
Handlers are invoked in increasing order of this value.
global 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
Name
Type
Description
value
Integer
Bulk capacity for the subscription.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global 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.
global 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
Name
Type
Description
value
Type
A description for the subscription.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global 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: - With the same Product - With the same fferpcore.Message Type - With the same Product Proxy
Input Parameters
Name
Type
Description
identifier
String
Used to set the identifier field on a subscription.
Sample Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//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 classClickLinkInstall implementsInstallHandler
global 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.