Logo
 
 

Channel Settings

 
 
 

A cloud service may require certain information to be defined at the channel level. A mechanism is provided to allow a connector developer to define settings in the service definition by using the ChannelSettings tag. The channel settings are available in the CPBM user interface under the channel details in the tab Service Controls, filterable by each instance of the cloud service.

The ChannelSettings are defined in the service definition using a set of Property tags. The definition of each Property is as described below:
Element (items in italics are attributes) Mandatory Description
Property     A property that needs to be configured
  id Yes Dot separated identifier of property (for example, endpoint.url)
  type Yes (Integer/String/URL/Boolean/Number)
  encrypted No (Default is false) (true/false)
  reconfigurable No (Default is false) (true/false) . This property is reconfigurable as long as no accounts from the channel have been registered on the cloud service.
  validation No

JSON validation string. Syntax same as for jquery.validation plugin, formal specification. Validations described here will be applied both on the Client and Server side.

List of supported validations:

required,

min-value,

max-value,

regex,

maxlength,

minlength

alphanumeric

email

  Default No Default value of the property
Sample use:
<!-- Define channel settings -->    <ChannelSettings>    	<Property id="setting1" type="String" encrypted="true" reconfigurable="false" validation='{"required":true}' />    	<Property id="setting2" type="Integer" encrypted="false" reconfigurable="true" validation='{"required":false}' default="5" />    	<Property id="setting3" type="URL" encrypted="false" reconfigurable="true" validation='{"required":false}' default="http://www.google.com" />    	<Property id="setting4" type="Boolean" encrypted="false" reconfigurable="true" validation='{"required":false}' default="http://www.google.com" />    	<Property id="setting5" type="Number" encrypted="false" reconfigurable="true" validation='{"required":false}' default="5.5566" />    </ChannelSettings>  
Methods added in channelService to get channelSettings:
/**     * @param channel     * @param serviceInstanceUuid     * @return a map of ChannelSettingServiceConfigMetadata     */    public Map<String, String> getChannelSettings(Channel channel, String serviceInstanceUuid);      /**     * @param tenant     * @param serviceInstanceUuid     * @return a map of ChannelSettingServiceConfigMetadata     */    public Map<String, String> getChannelSettings(Tenant tenant, String serviceInstanceUuid);      /**     *      * @param channel     * @param serviceInstanceUuid     * @return List of ServiceInstanceConfig     */    public List<ServiceInstanceConfig> getChannelSettingsList(Channel channel, String serviceInstanceUuid);  
 
또 다른 질문이 있으십니까? 문의 등록

댓글

 
Adding comment, please wait....

Provide Feedback on Article:

Subject:
Comments:*
Zendesk 제공