Derivatives of RestService
Derivatives of RestService interface facilitates creation of RESTful implementation of standard services.
Simple search (simple-search)
simple-search service:com.hcl.unica.system.integration.service.search.RestSearchServiceThe
com.example.service.rest.SimpleSearchServiceclass in asset-integration-starter project is a quick starter implementation for RESTfulsimple-searchservice. Its parent iscom.hcl.unica.system.integration.service.search.RestSearchServiceclass.The
RestSearchServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isSimpleSearchResponseclass defined inside theasset-integration-starterproject.RestSearchServiceclass implementsRestServiceinterface and defines theSearchRequestclass as the type argument RQ forRestService. Thus, the object ofSearchRequestbecomes input to all thesimple-searchservices (same input is used for Functional counterpart of simple-search as well).SearchRequestclass is part of the Content Integration SDK.In addition to defining the input type for the
simple-searchservice,RestSearchServiceclass also overrides thetransformResponsemethod and defines return value of this method to be ofContentPagetype.ContentPageis also part of the Content Integration SDK and encapsulates the search result and associated pagination details.The plugin must extend its
simple-searchimplementation from the servicecom.hcl.unica.system.integration.service.search.RestSearchServiceto be recognized as asimple-searchservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from, for thesimple-searchservices implemented using the Functional approach).RestSearchServiceextends fromcom.hcl.unica.system.integration.service.search .AbstractSearchServiceabstract class.We recommend looking at
com.aem.service.AemSimpleSearchServiceclass from theaem-integrationproject to know more about how theSearchRequestclass and theContentPageclass are used during service implementation.Adhering to the contract of
Presentableinterface while populating list of contents inContentPageis a crucial part of this service implementation.Presentableinterface is covered in more detail in subsequent section.com.hcl.unica.system.integration.service.search.AbstractSearchServiceThis is a common base class for RESTful as well as Functional
simple-searchimplementations. So, the details of this class also apply to the Functional implementation ofsimple-search.This class defines the
com.hcl.unica.system.integration.service.gateway.SimpleSearchServiceGatewayinterface as the service gateway for thesimple-searchservice. A closer look at this interface tells us that thesimple-searchtakes theSearchRequestobject and returns theContentPageobject.In addition to defining the service interface forsimple-search, it introduces one more method for thesimple-searchservice, namedgetSupportedContentTypes. Everysimple-searchimplementation can optionally override and implement this method. Please note that this method is verysimple-searchspecific and has nothing to do with other standard and custom services. The signature of this method is as follows:public Map<String, String> getSupportedContentTypes();Implementation of this method returns a
Map<String, String>representing the supported categories of contents that can be searched in the target system. There is no specific semantic associated with the entries in this Map. It can be any meaningful key-value pair. It acts as a filter for client application during the search operation. As of current implementation of Unica Content Integration, this Map is used to populate entries in a drop down, wherein keys of the Map become values of the options, and values of the Map become display labels for the options. Thus, keys can carry internal names, or identifiers, and values should be readable and meaningful texts. If the user needs to search any specific type of content, he can choose one or more options from the supported types. In such case,simple-searchservice receives a set of keys corresponding to the values chosen by the user. Set of keys received from the client application can be obtained fromExecutionContextobject by navigating through thegetRequestmethod and then callinggetTypes()on it. Thesimple-searchimplementation deals with these set of keys, as per the target system���s programming interface, and filters the search items accordingly.Standard service parameter - supportedContentTypes
Overriding
getSupportedContentTypesmethod is recommended only if the Map needs to be generated dynamically. Content Integration Framework provides an alternate approach to statically define this Map using a standard service parameter calledsupportedContentTypes, configured underparamselement in the service declaration file. For example, refer thesimple-searchservice declaration for AEM and WCM inside <ASSET_PICKER_HOME>/conf/plugin-services.yml file.
List content categories (list-content-categories)
The following are the specialized interfaces and classes available for the
list-content-categories service:
-
com.hcl.unica.system.integration.service.content.categories.list. RestContentCategoriesListServiceThe
com.example.service.rest. ExampleContentCategoryListingService class in asset-integration-starter project is a quick starter for RESTful list-content-categories service. ExampleContentCategoryListingService class extends from RestContentCategoriesListService class.The
RestContentCategoriesListServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it is specified asList<ContentCategoryDetails>for the sake of example.RestContentCategoriesListServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.content.categories.ContentCategoryListRequest class as the type argument RQ for RestService. Thus, the object of ContentCategoryListRequest becomes input to all thelist-content-categoriesservices (same input is used for Functional counterpart of list-content-categories as well).ContentCategoryListRequestobject should be consulted for parent category ID as well as for parent folder ID if categories are hierarchical and/or maintained in folder hierarchy.In addition to defining the input type for the list-content-categories service, RestContentCategoriesListService class also overrides the transformResponse method and mandates the return value of this method to be an object of
List<ContentCategory>type.ContentCategoryclass is part of Content Integration SDK.The plugin must extend the implementation of list-content-categories service from com.hcl.unica.system.integration.service.content.categories.list. RestContentCategoriesListService class to be recognized as a valid list-content-categories service by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
RestContentCategoriesListServiceextends from
.com.hcl.unica.system.integration.service.content.categories.list.AbstractContentCategoriesListService class -
com.hcl.unica.system.integration.service.content.categories.list.AbstractContentCategoriesListServiceThis is a common base class for
RESTfulas well as Functional implementations oflist-content-categoriesservice. So, the details covered herein applies to Functional version oflist-content-categoriesas well.This class defines the
com.hcl.unica.system.integration.service.gateway.ContentCategoriesListServiceGatewayinterface as the service gateway for thelist-content-categoriesservice. This interface extends fromcom.hcl.unica.system.integration.service.gateway.ServiceGatewayinterface and mandates theContentCategoryListRequest & List<ContentCategory>objects to be the input and output types for thelist-content-categoriesservice.
List folders (list-folders)
The following are the specialized interfaces and classes available for the
list-folders service:
com.hcl.unica.system.integration.service.folder.list.RestFolderListServiceThe
com.aem.service.AemFolderListServiceclass inaem-integrationproject is a reference implementation for RESTful list-folders service.AemFolderListServiceclass extends fromRestFolderListServiceclass.The
RestFolderListServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isSimpleSearchResponseclass defined inside theaem-integrationproject.RestFolderListServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.folder.list.FolderListRequestclass as the type argument RQ forRestService. Thus, the object ofFolderListRequestbecomes input to all thelist-foldersservices (same input is used for Functional counterpart oflist-foldersas well).In addition to defining the input type for the
list-foldersservice,RestFolderListServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofList<Folder>type. Folder is a standard type defined in Content Integration SDK.The plugin must extend the implementation of
list-foldersservice fromcom.hcl.unica.system.integration.service.folder.list.RestFolderListServiceclass to be recognized as a valid list-folders service by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).RestFolderListServiceextends fromcom.hcl.unica.system.integration.service.folder.list.AbstractFolderListServiceclass.com.hcl.unica.system.integration.service.folder.list. AbstractFolderListServiceThis is a common base class for RESTful as well as Functional implementations of
list-foldersservice. So, the details covered herein applies to Functional version oflist-foldersas well.This class defines the
com.hcl.unica.system.integration.service.gateway.FolderListServiceGatewayinterface as the service gateway for thelist-foldersservice. This interface extends fromcom.hcl.unica.system.integration.service.gateway.ServiceGatewayinterface and mandates theFolderListRequestandList<Folder>objects to be the input and output types for thelist-foldersservice.
List category folders (list-category-folders)
The specialized types used for implementing list-category-folders are exactly same as the ones used for list-folders.
List contents (list-contents)
The following are the specialized interfaces and classes available for the list-contents service:
com.hcl.unica.system.integration.service.content.list.RestContentListServiceThe
com.aem.service.AemContentListServiceclassinaem-integrationproject is a reference implementation for RESTfullist-contentsservice.AemContentListServiceclassclass extends fromRestContentListServiceclass.The
RestContentListServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isSimpleSearchResponseclass defined inside theaem-integrationproject.RestContentListServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.content.list.ContentListRequestclass as the type argument RQ forRestService. Thus, the object ofContentListRequestbecomes input to all thelist-contentsservices (same input is used for Functional counterpart oflist-contentsas well).In addition to defining the input type for the
list-contentsservice,RestContentListServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofContentPagetype. This return type is same as the one used forsimple-searchservice.ContentPageis a standard type defined in Content Integration SDK.The plugin must extend the implementation of
list-contentsservice fromcom.hcl.unica.system.integration.service.content.list.RestContentListServiceclass to be recognized as a validlist-contentsservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).RestContentListServiceextends fromcom.hcl.unica.system.integration.service.content.list.AbstractContentListServiceclass.com.hcl.unica.system.integration.service.content.list.AbstractContentListServiceThis is a common base class for RESTful as well as Functional implementations of
list-contentsservice. So, the details covered herein applies to Functional version oflist-contentsas well.This class defines the
com.hcl.unica.system.integration.service.gateway.ContentListServiceGatewayinterface as the service gateway for thelist-contentsservice. This interface extends fromcom.hcl.unica.system.integration.service.gateway.ServiceGatewayinterface and mandates theContentListRequestandContentPageobjects to be the input and output types for thelist-contentsservice.
Get content details (get-content-details)
The following are the specialized interfaces and classes available for the get-content-details service:
com.hcl.unica.system.integration.service.content.details.RestContentDetailsServiceThe
com.aem.service.AemObjectDetailsServiceclass inaem-integrationproject is a reference implementation for RESTfulget-content-detailsservice.AemObjectDetailsServiceclass extends fromRestContentDetailsServiceclass.The
RestContentDetailsServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isSimpleSearchResponseclass defined inside theaem-integrationproject.RestContentDetailsServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.content.details.ContentDetailsRequestclass as the type argument RQ forRestService. Thus, the object ofContentDetailsRequestbecomes input to all theget-content-detailsservices (same input is used for Functional counterpart ofget-content-detailsas well).In addition to defining the input type for the
get-content-detailsservice,RestContentDetailsServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object of Presentable type.The plugin must extend the implementation of
get-content-detailsservice fromcom.hcl.unica.system.integration.service.content.details.RestContentDetailsServiceclass to be recognized as a validget-content-detailsservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).RestContentDetailsServiceextends from thecom.hcl.unica.system.integration.service.content.details.AbstractContentDetailsServiceclass.com.hcl.unica.system.integration.service.content.details.AbstractContentDetailsServiceThis is a common base class for RESTful as well as Functional implementations of
get-content-detailsservice. So, the details covered herein applies to Functional version ofget-content-detailsas well.This class defines the
com.hcl.unica.system.integration.service.gateway.ContentDetailsServiceGatewayinterface as the service gateway for theget-content-detailsservice.ServiceGatewaysare the means to programmatically define input and output types of the service and facilitate invocation of the services. A closer look at this interface tells us that theget-content-detailsservice accepts theContentDetailsRequestobject and returns a Presentable object.
Get cognitive analysis (get-cognitive-analysis)
The following are the specialized interfaces and classes available for the get-cognitive-analysis service:
com.hcl.unica.system.integration.service.cognitive.analysis.RestCognitiveAnalysisServiceThe
com.example.service.rest.ExampleCognitiveAnalysisServiceinasset-integration-starterproject is a quick starter implementation for RESTfulget-cognitive-analysisservice.ExampleCognitiveAnalysisServicein class extends fromRestCognitiveAnalysisServiceclass.The
RestCognitiveAnalysisServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isCognitiveDetailsclass defined inside theasset-integration-starterproject.RestCognitiveAnalysisServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.cognitive.analysis.CognitiveAnalysisRequestclass as the type argument RQ forRestService. Thus, the object ofCognitiveAnalysisRequestbecomes input to all theget-cognitive-analysisservices (same input is used for Functional counterpart as well).In addition to defining the input type for the
get-cognitive-analysisservice,RestCognitiveAnalysisServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofcom.hcl.unica.system.model.response.cognitive.analysis.CognitiveAnalysistype.CognitiveAnalysisis a standard type defined in Content Integration SDK.The plugin must extend the implementation of
get-cognitive-analysisservice fromcom.hcl.unica.system.integration.service.cognitive.analysis.RestCognitiveAnalysisServiceclass to be recognized as a validget-cognitive-analysisservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).RestCognitiveAnalysisServiceextends fromcom.hcl.unica.system.integration.service.cognitive.analysis.AbstractCognitiveAnalysisServiceclass.com.hcl.unica.system.integration.service.cognitive.analysis.AbstractCognitiveAnalysisServiceThis is a common base class for RESTful as well as Functional implementations of
get-cognitive-analysisservice. So, the details covered herein applies to Functional version ofget-cognitive-analysisas well.This class defines the
com.hcl.unica.system.integration.service.gateway.CognitiveAnalysisServiceGatewayinterface as the service gateway for theget-cognitive-analysisservice. This interface extends fromcom.hcl.unica.system.integration.service.gateway.ServiceGatewayinterface and mandates theCognitiveAnalysisRequestandCognitiveAnalysisobjects to be the input and output types for theget-cognitive-analysisservice.
Object extension service
com.hcl.unica.system.integration.service.object.extension.RestObjectExtensionServiceThe
com.example.service.rest.ExampleObjectExtensionServicein asset-integration-starter project is a quick starter implementation for RESTful object extension service.ExampleObjectExtensionServiceclass extends fromRestObjectExtensionServiceclass.The
RestObjectExtensionServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case, it is CognitiveDetails class defined inside theasset-integration-starterproject.RestObjectExtensionServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.object.extension.ObjectExtensionRequestclass as the type argument RQ forRestService. Thus, the object ofObjectExtensionRequestbecomes input to object extension services (same input is used for Functional counterpart as well).ObjectExtensionRequestis discussed in subsequent section.In addition to defining the input type for object extension service,
RestObjectExtensionServiceclass also overrides thetransformResponsemethod and allows returning any type of object.The plugin must extend the implementation of object extension service from
com. hcl.unica.system.integration.service.object.extension.RestObjectExtensionServiceclass to be recognized as a valid object extension service by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).RestObjectExtensionServiceextends fromcom.hcl.unica.system.integration.service.object.extension.AbstractObjectExtensionServiceclass.com.hcl.unica.system.model.request.object.extension.ObjectExtensionRequestThe
ObjectExtensionRequestprovides and API to retrieve values of request attributes. The core principle of object extension service is to accept desired request attributes, perform designated operation and optionally return with a response object. Request attribute values are obtained from the object whose capabilities need to be extended by using the object extension service being implemented. Implementation of object extension service must be request object agnostic. It is the responsibility of Content Integration Framework to extract request attributes from the object to be extended and supply it to the object extension service by means ofObjectExtensionRequest. Thus, object extension service must be able to extend the capability of any object if the object being extended contains the required request attributes for the object extension service.ObjectExtensionRequestprovides following methods for obtaining request attribute values ���Collection<AttributeValue> getAttributeValues()��� This method returns a collection of all request attribute values.Attribute values are wrapped inside
AttributeValueobject, which provides API for reading the value of attribute. It provides a convenience method, as(Class<T> type), for obtaining type cast value of the attribute. Likewise,getValue()method can be used to read the uncast value.Furthermore,
AttributeValueclass providesgetAttributeSchema()method to obtain the meta information about respective attribute.getAttributeSchema()returns an object ofAttributeSchemacontaining the required meta information about attribute. The most important methods inAttributeSchemaaregetType()&getFormat(). These methods can be consulted to check if the attribute is of desired type. As of 12.1.1 release of Content Integration Framework, object extension service may receive values for the attributes which are not of required type. Hence, extension service must consult the type & format of the attribute before using its value. Service implementation must filter the required attribute values by itself. Refer to thebuildRequestmethod implementation incom.example.service.rest.ExampleObjectExtensionServiceto learn how this can be achieved. This example implementation tries to extract first URL & first Text attribute from the request.Map<String, AttributeValue> getAttributes()- From release 12.1.2 onward, request attributes of object extension service can also be mapped to source object���s attributes. get-object-schema service must be enhanced in such case to generate schema for request object. Following standard service parameter must be set to true if request attribute mapping is desired for the given object extension service. If this parameter is missing, it is assumed to be false by default. Likewise, requirement of response attribute mapping can also be indicated using attributeMappingSupport | response parameter. By default, Content Integration Framework assumes value for response to be true.params: attributeMappingSupport: request: true response: truegetAttributes()method returns map of attribute values, wherein values are organized by respective attribute identifiers. The Map object returned by this method is useful for retrieving attribute value using its identifier (as used in object schema).Object extension service can override void
validateRequest(ExecutionContext<ObjectExtensionRequest> executionContext) method to probe request attributes before performing core operation.InvalidServiceRequestExceptioncan be raised If desired attributes are not found in theObjectExtensionRequest. Refer to the Validation supportboolean isStronglyBound()��� Object extension services written prior to 12.1.2 may still receive unmapped requests if user hasn���t changed the request mapping for such services. This method can be consulted to check if request object attribute mapping exists for the given execution request. This method returns true if object extension service does have request object attribute mapping, false otherwise. If this method returns true, service can look for its request object attributes by their identifiers in the Map returned bygetAttributes()method. Else, it must find out required type of attributes the wayExampleObjectExtensionServicedoes inasset-integration-starterproject.
com.hcl.unica.system.integration.service.object.extension.AbstractObjectExtensionServiceThis is a common base class for RESTful as well as Functional implementations of object extension service. So, the details covered herein applies to Functional version as well.
This class defines the
com.hcl.unica.system.integration.service.gateway.ObjectExtensionServiceGatewayinterface as the service gateway for object extension service. This interface extends fromcom.hcl.unica.system.integration.service.gateway.ServiceGatewayinterface and mandates theObjectExtensionRequestto be the input type for object extension service. Object extension service can return any type of object.Service title & summary
Object extension services are listed as Custom actions in Centralized Offer Management. The title/label for object extension service is derived from I18n resource bundles using the key same as service name declared for respective object extension service. Likewise, a brief summary is also shown for the service to help users working with it. Summary is maintained in I18n resource bundles using
{service-name}.summarykey. For example, checkexample-object-extension-service&example-object-extension-service.summarykeys inasset-integration-starter\src\main\resources\i18n\Foo_Messages.propertiesfile.
Collaboration services
- Channel creation service
(
collaboration.create-channel)- The following are the specialized interfaces and classes available for the collaboration.create-channel service:-
com.hcl.unica.system.integration.service.collab.channel.create.RestChannelCreationService���The
com.example.service.rest.collaboration.ExampleChannelCreationServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.create-channelservice.ExampleChannelCreationServiceclass extends fromRestChannelCreationServiceclass.The
RestChannelCreationServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it is JsonNode class defined inside theExampleChannelCreationServiceclass.RestChannelCreationServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.collab.channel.CollaborationChannelCreationRequestclass as the type argument RQ forRestService. Thus, the object ofCollaborationChannelCreationRequestbecomes input to all thecollaboration.create-channelservices (same input is used for Functional counterpart as well).CollaborationChannelCreationRequestcarries the name of channel to be created.In addition to defining the input type for the
collaboration.create-channelservice,RestChannelCreationServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofcom.hcl.unica.system.model.response.collab.channel.CollaborationChannelDetailstype.CollaborationChannelDetailsmust carry the identifier of the newly created channel in addition to its name. It can optionally contain URL to the channel page.Plugin must extend the implementation of
collaboration.create-channelservice fromRestChannelCreationServiceclass to be recognized as a valid collaboration.create-channel service by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-
- Channel modification service
(
collaboration.update-channel)The following are the specialized interfaces and classes available for thecollaboration.update-channelservice:-
com.hcl.unica.system.integration.service.collab.channel.update.RestChannelModificationService���The
com.example.service.rest.collaboration.ExampleChannelModificationServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.update-channelservice.ExampleChannelModificationServiceclass extends fromRestChannelModificationServiceclass.The
RestChannelModificationServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it is JsonNode class defined inside theExampleChannelModificationServiceclass.RestChannelModificationServiceclass implements RestService interface and defines thecom.hcl.unica.system.model.request.collab.channel.CollaborationChannelModificationRequestclass as the type argument RQ for RestService. Thus, the object ofCollaborationChannelModificationRequestbecomes input to all the collaboration.update-channel services (same input is used for Functional counterpart as well).CollaborationChannelModificationRequestcarries the identifier of the channel to be updated along with the new channel name.In addition to defining the input type for the
collaboration.update-channelservice,RestChannelModificationServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofcom.hcl.unica.system.model.response.collab.channel.CollaborationChannelDetailstype.CollaborationChannelDetailsmust carry the identifier & name of the updated channel. It can optionally contain URL to the channel page.Plugin must extend the implementation of
collaboration.update-channelservice fromRestChannelModificationServiceclass to be recognized as a validcollaboration.update-channelservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-
- Channel details service
(
collaboration.get-channel-details)The following are the specialized interfaces and classes available for the collaboration.get-channel-details service:-
com.hcl.unica.system.integration.service.collab.channel.details.RestChannelDetailsService���The
com.example.service.rest.collaboration.ExampleChannelDetailsServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.get-channel-detailsservice.ExampleChannelDetailsServiceclass extends fromRestChannelDetailsServiceclass.The
RestChannelDetailsServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it is JsonNode class defined inside theExampleChannelDetailsServiceclass.RestChannelDetailsServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.collab.channel.CollaborationChannelDetailsRequestclass as the type argument RQ forRestService. Thus, the object ofCollaborationChannelDetailsRequestbecomes input to all thecollaboration.get-channel-detailsservices (same input is used for Functional counterpart as well).CollaborationChannelDetailsRequestcarries the identifier of the channel to be retrieved.In addition to defining the input type for the
collaboration.get-channel-detailsservice,RestChannelDetailsServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofjava.util.Optionalofcom.hcl.unica.system.model.response.collab.channel.CollaborationChannelDetailstype.CollaborationChannelDetailsmust carry the identifier & name of the requested channel. It can optionally contain URL to the channel page. If requested channel is not found, this method can returnOptional.empty().Plugin must extend the implementation of
collaboration.get-channel-detailsservice fromRestChannelDetailsServiceclass to be recognized as a validcollaboration.get-channel-detailsservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-
- Member addition service
(
collaboration.add-members-to-channel)The following are the specialized interfaces and classes available for thecollaboration.add-members-to-channelservice:-
com.hcl.unica.system.integration.service.collab.channel.member.RestChannelMemberAdditionService���The
com.example.service.rest.collaboration.ExampleMemberAdditionServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.add-members-to-channelservice.ExampleMemberAdditionServiceclass extends fromRestChannelMemberAdditionServiceclass.The
RestChannelMemberAdditionServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it is JsonNode class defined inside theExampleMemberAdditionServiceclass.RestChannelMemberAdditionServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.collab.channel.CollaborationChannelMembersclass as the type argument RQ for RestService. Thus, the object ofCollaborationChannelMembersbecomes input to all thecollaboration.add-members-to-channelservices (same input is used for Functional counterpart as well).CollaborationChannelMemberscarries the channel identifier & list ofcom.hcl.unica.system.model.request.collab.channel.CollaborationChannelMemberobjects. EachCollaborationChannelMemberobject carries identifier of the user/member to be added to the channel corresponding to the supplied channel identifier.In addition to defining the input type for the
collaboration.add-members-to-channelservice,RestChannelMemberAdditionServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofcom.hcl.unica.system.model.response.collab.channel.ChannelMembersAdditionStatustype.ChannelMembersAdditionStatusmust carry the list ofcom.hcl.unica.system.model.response.collab.channel.ChannelMemberAdditionStatusobjects containing addition status for each supplied member. ThememberIdproperty inChannelMemberAdditionStatusobject should carry the identifier of member/user the status is being reported for. The error property can be used to convey error message associated with specified member���s addition operation. Plugin can choose to send localized error using an API provided byExecutionContext. The ok property must be set to true if member is successfully added to the channel, or to false otherwise. Reason property should be used to convey appropriate failure reason. The entire list of member addition status should be set on the status property ofChannelMembersAdditionStatusobject to be returned fromtransformResponsemethod.Plugin must extend the implementation of
collaboration.add-members-to-channelservice fromRestChannelMemberAdditionServiceclass to be recognized as a validcollaboration.add-members-to-channelservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-
- Member removal service
(
collaboration.remove-members-from-channel)The following are the specialized interfaces and classes available for thecollaboration.remove-members-from-channelservice:-
com.hcl.unica.system.integration.service.collab.channel.member.RestChannelMemberRemovalService���The
com.example.service.rest.collaboration.ExampleMemberRemovalServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.remove-members-from-channelservice.ExampleMemberRemovalServiceclass extends fromRestChannelMemberRemovalServiceclass.The
RestChannelMemberRemovalServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isJsonNodeclass defined inside theExampleMemberRemovalServiceclass.RestChannelMemberRemovalServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.collab.channel.CollaborationChannelMembersclass as the type argument RQ forRestService. Thus, the object ofCollaborationChannelMembersbecomes input to all thecollaboration.remove-members-from-channelservices (same input is used for Functional counterpart as well).CollaborationChannelMemberscarries the channel identifier & list ofcom.hcl.unica.system.model.request.collab.channel.CollaborationChannelMemberobjects. EachCollaborationChannelMemberobject carries identifier of the user/member to be removed from the channel corresponding to the supplied channel identifier.In addition to defining the input type for the
collaboration.remove-members-from-channelservice,RestChannelMemberRemovalServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object ofcom.hcl.unica.system.model.response.collab.channel.ChannelMembersRemovalStatustype.ChannelMembersRemovalStatusmust carry the list ofcom.hcl.unica.system.model.response.collab.channel.ChannelMemberRemovalStatusobjects containing removal status for each supplied member. The memberId property inChannelMemberRemovalStatusobject should carry the identifier of member/user the status is being reported for. The error property can be used to convey error message associated with specified member���s removal operation. Plugin can choose to send localized error using an API provided byExecutionContext. The ok property must be set to true if member is successfully removed from the channel, or to false otherwise. reason property should be used to convey appropriate failure reason. The entire list of member addition status should be set on the status property ofChannelMembersRemovalStatusobject to be returned fromtransformResponsemethod.Plugin must extend the implementation of
collaboration.remove-members-from-channelservice fromRestChannelMemberRemovalServiceclass to be recognized as a validcollaboration.remove-members-from-channelservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-
- Message posting service
(
collaboration.post-message-to-channel)The following are the specialized interfaces and classes available for thecollaboration.post-message-to-channelservice:-
com.hcl.unica.system.integration.service.collab.channel.message.RestMessagePostingService���The
com.example.service.rest.collaboration.ExampleMessagePostingServiceinasset-integration-starterproject is a quick starter implementation for RESTfulcollaboration.post-message-to-channelservice.ExampleMessagePostingServiceclass extends fromRestMessagePostingServiceclass.The
RestMessagePostingServiceclass has a type parameter RS, which represents the type of response (post deserialization) received from the remote REST API. In this case it isJsonNodeclass defined inside theExampleMessagePostingServiceclass.RestMessagePostingServiceclass implementsRestServiceinterface and defines thecom.hcl.unica.system.model.request.collab.channel.GroupMessageclass as the type argument RQ forRestService. Thus, the object ofGroupMessagebecomes input to all thecollaboration.post-message-to-channelservices (same input is used for Functional counterpart as well).GroupMessagecarries the identifier of target channel & the message itself.In addition to defining the input type for the
collaboration.post-message-to-channelservice,RestMessagePostingServiceclass also overrides thetransformResponsemethod and mandates the return value of this method to be an object of sameGroupMessagetype. The responseGroupMessageobject should carry the identifier of newly posted message.Plugin must extend the implementation of
collaboration.post-message-to-channelservice fromRestMessagePostingServiceclass to be recognized as a validcollaboration.post-message-to-channelservice by the Content Integration Framework (Functional counterpart, discussed later, is also a valid choice to extend from).
-