Class SubConfigMeta


  • public class SubConfigMeta
    extends Object
    • Constructor Detail

      • SubConfigMeta

        public SubConfigMeta​(String serviceName,
                             AMModel model)
    • Method Detail

      • hasGlobalSubSchema

        public boolean hasGlobalSubSchema()
        Returns true if there are global sub schema.
        Returns:
        true if there are global sub schema.
      • getSubConfigurations

        public List getSubConfigurations()
        Returns list of sub configuration objects.
        Returns:
        list of sub configuration objects.
        See Also:
        SMSubConfig
      • getCreateableSubSchemaNames

        public Map getCreateableSubSchemaNames()
        Returns a map of sub schema name to its localized name. We should be able to create sub configuration with these names.
        Returns:
        Map of sub schema name to its localized name.
      • getServiceSchema

        public ServiceSchema getServiceSchema()
        Returns sub service schema.
      • getServiceSchema

        public ServiceSchema getServiceSchema​(String name)
                                       throws SMSException
        Returns sub service schema of current sub schema.
        Parameters:
        name - Name of sub schema.
        Throws:
        SMSException - if sub schema cannot be determined.
      • getServiceSchemaDefaultValues

        public Map getServiceSchemaDefaultValues​(String name)
                                          throws SMSException
        Returns default values of sub service schema of current sub schema. Map of attribute name (String) to attribute values (Set).
        Parameters:
        name - Name of sub schema.
        Throws:
        SMSException - if default values be determined.
      • setParentId

        public void setParentId​(String parentId)
      • getParentName

        public String getParentName()
        Get the parent configuration's name.
        Returns:
        The parent configuration's name.
      • getParentDisplayName

        public String getParentDisplayName()
        Get the parent configuration's display name. It will check if the service configuration has an internationalization key and if it does, the localised name will be returned. Otherwise the config name itself will be returned.
        Returns:
        The parent configuration's display name.
      • deleteSubConfigurations

        public void deleteSubConfigurations​(Set names)
                                     throws AMConsoleException
        Deletes sub configurations.
        Parameters:
        names - Set of sub configuration names that are to be deleted.
        Throws:
        AMConsoleException - if sub configurations cannot be deleted.
      • createSubConfig

        public void createSubConfig​(String name,
                                    String schemaName,
                                    Map values)
                             throws AMConsoleException
        Creates a new sub configuration.
        Parameters:
        name - Name of sub configuration.
        schemaName - Name of schema name.
        values - Map of attribute name to its values.
        Throws:
        AMConsoleException - if sub configuration cannot be created.
      • getSubConfigAttributeValues

        public Map getSubConfigAttributeValues()
                                        throws AMConsoleException
        Returns attribute values.
        Returns:
        attribute values.
        Throws:
        AMConsoleException - if attribute values cannot be determined.
      • setSubConfigAttributeValues

        public void setSubConfigAttributeValues​(Map values)
                                         throws AMConsoleException
        Set attribute values.
        Parameters:
        values - Attribute values.
        Throws:
        AMConsoleException - if attribute values cannot be set.