org.wso2.carbon.governance.api.util

## Class GovernanceArtifactConfiguration

- java.lang.Object
- - org.wso2.carbon.governance.api.util.GovernanceArtifactConfiguration

-     public class GovernanceArtifactConfiguration
      extends Object

  Configuration of a Governance Artifact

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ENTRY_FIELD`
    `static String` | `TEXT_FIELD`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GovernanceArtifactConfiguration()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addLifeCycleToContext(String context, String lcName)`
    `String` | `getArtifactElementNamespace()` Method to obtain the namespace of the root element of an XML governance artifact.
    `String` | `getArtifactElementRoot()` Method to obtain the name of the root element of an XML governance artifact.
    `String` | `getArtifactNameAttribute()` Method to obtain the attribute that specifies the artifact name.
    `String` | `getArtifactNamespaceAttribute()` Method to obtain the attribute that specifies the artifact namespace.
    `org.apache.axiom.om.OMElement` | `getContentDefinition()` Method to obtain the content definition element.
    `String` | `getContentURL()` Method to get the content URL.
    `String[]` | `getExpressionsOnListUI()` Method to obtain the list of expressions that will be used to populate the content on the artifact list UI.
    `String` | `getExtension()` Method to obtain the extension.
    `String` | `getGroupingAttribute()` Returns the grouping attribute
    `int` | `getIconSet()` Method to obtain the icon set to be used.
    `String` | `getKey()` Method to obtain the key that can be used to locate an artifact.
    `String[]` | `getKeysOnListUI()` Method to obtain the list of keys that will be used to generate the artifact list UI.
    `String` | `getLifecycle()` Method to obtain the lifecycle associated with the artifact configuration
    `String` | `getLifeCycleOfContext(String context)`
    `List<Map>` | `getMandatoryAttributes()` Method to get a list of maps containing mandatory fields for a given artifact
    `String` | `getMediaType()` Method to obtain the media type.
    `String[]` | `getNamesOnListUI()` Method to obtain the list of names that will be displayed on the artifact list UI.
    `String` | `getPathExpression()` Method to obtain the expression that can be used to compute where to store the artifact.
    `String` | `getPluralLabel()` Method to obtain the label used in plural representations of the artifact.
    `org.wso2.carbon.registry.core.Association[]` | `getRelationshipDefinitions()` Method to retrieve the relationship details.
    `String` | `getSingularLabel()` Method to obtain the label used in singular representations of the artifact.
    `Map<String,Map<String,Boolean>>` | `getTaxonomy()` Method to obtain the taxonomy associated with the artifact configuration
    `String[]` | `getTypesOnListUI()` Method to obtain the list of types that will be used to populate the content on the artifact list UI.
    `org.apache.axiom.om.OMElement` | `getUIConfigurations()` Method to obtain the UI configurations element.
    `org.wso2.carbon.utils.component.xml.config.ManagementPermission[]` | `getUIPermissions()` Method to obtain the UI permissions element.
    `List<String>` | `getUniqueAttributes()`
    `List<Map>` | `getValidationAttributes()` Method to obtain the list of keys, in the form used in GovernanceArtifact getAttributes/setAttributes methods, for attributes need to be regex validated.
    `boolean` | `hasNamespace()` Method to get whether namespace exists.
    `void` | `setArtifactElementNamespace(String artifactElementNamespace)` Method to set the namespace of the root element of an XML governance artifact.
    `void` | `setArtifactElementRoot(String artifactElementRoot)` Method to set the name of the root element of an XML governance artifact.
    `void` | `setArtifactNameAttribute(String artifactNameAttribute)` Method to set the attribute that specifies the artifact name.
    `void` | `setArtifactNamespaceAttribute(String artifactNamespaceAttribute)` Method to set the attribute that specifies the artifact namespace.
    `void` | `setContentDefinition(org.apache.axiom.om.OMElement contentDefinition)` Method to set the content definition element.
    `void` | `setContentURL(String contentURL)` Method to set the content URL.
    `void` | `setExtension(String extension)` Method to set the extension.
    `void` | `setGroupingAttribute(String groupingAttribute)`
    `void` | `setHasNamespace(boolean hasNamespace)` Method to set whether namespace exists.
    `void` | `setIconSet(int iconSet)` Method to set the icon set to be used.
    `void` | `setKey(String key)` Method to set the key that can be used to locate an artifact.
    `void` | `setLifecycle(String lifecycle)` Method to associate lifecycle with the artifact configuration
    `void` | `setMediaType(String mediaType)` Method to set the media type.
    `void` | `setPathExpression(String pathExpression)` Method to set the expression that can be used to compute where to store the artifact.
    `void` | `setPluralLabel(String pluralLabel)` Method to set the label used in plural representations of the artifact.
    `void` | `setRelationshipDefinitions(org.wso2.carbon.registry.core.Association[] relationships)` Method to set the relationship details.
    `void` | `setSingularLabel(String singularLabel)` Method to set the label used in singular representations of the artifact.
    `void` | `setTaxonomy(String taxonomyName, Boolean disable, Boolean isGlobal)` Method to associate taxonomy with the artifact configuration
    `void` | `setUIConfigurations(org.apache.axiom.om.OMElement uiConfigurations)` Method to set the UI configurations element.
    `void` | `setUIListConfigurations(org.apache.axiom.om.OMElement listConfigurations)` Method to set the configuration for the artifact list UI.
    `void` | `setUIPermissions(org.wso2.carbon.utils.component.xml.config.ManagementPermission[] uiPermissions)` Method to set the UI permissions element.
    `protected void` | `setUniqueAttributes()`
    `void` | `setUniqueAttributes(List<String> uniqueAttributes)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### TEXT_FIELD

          public static final String TEXT_FIELD

      See Also:
        Constant Field Values

    - #### ENTRY_FIELD

          public static final String ENTRY_FIELD

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### GovernanceArtifactConfiguration

          public GovernanceArtifactConfiguration()

  - ### Method Detail

    - #### getMediaType

          public String getMediaType()

      Method to obtain the media type.
      Returns:
        the media type.

    - #### setMediaType

          public void setMediaType(String mediaType)

      Method to set the media type.
      Parameters:
        `mediaType` - the media type.

    - #### getContentURL

          public String getContentURL()

      Method to get the content URL.

    - #### setContentURL

          public void setContentURL(String contentURL)

      Method to set the content URL.
      Parameters:
        `contentURL` - the content URL.

    - #### getExtension

          public String getExtension()

      Method to obtain the extension.
      Returns:
        the extension.

    - #### setExtension

          public void setExtension(String extension)

      Method to set the extension.
      Parameters:
        `extension` - the extension.

    - #### hasNamespace

          public boolean hasNamespace()

      Method to get whether namespace exists.

    - #### setHasNamespace

          public void setHasNamespace(boolean hasNamespace)

      Method to set whether namespace exists.
      Parameters:
        `hasNamespace` - whether namespace exists.

    - #### getIconSet

          public int getIconSet()

      Method to obtain the icon set to be used.
      Returns:
        the icon set to be used.

    - #### setIconSet

          public void setIconSet(int iconSet)

      Method to set the icon set to be used.
      Parameters:
        `iconSet` - the icon set to be used.

    - #### getGroupingAttribute

          public String getGroupingAttribute()

      Returns the grouping attribute
      Returns:
        Grouping attribute name

    - #### setGroupingAttribute

          public void setGroupingAttribute(String groupingAttribute)

      Parameters:
        `groupingAttribute` - attribute to be grouped from

    - #### getArtifactNameAttribute

          public String getArtifactNameAttribute()

      Method to obtain the attribute that specifies the artifact name.
      Returns:
        the attribute that specifies the artifact name.

    - #### setArtifactNameAttribute

          public void setArtifactNameAttribute(String artifactNameAttribute)

      Method to set the attribute that specifies the artifact name.
      Parameters:
        `artifactNameAttribute` - the attribute that specifies the artifact name.

    - #### getArtifactNamespaceAttribute

          public String getArtifactNamespaceAttribute()

      Method to obtain the attribute that specifies the artifact namespace.
      Returns:
        the attribute that specifies the artifact namespace.

    - #### setArtifactNamespaceAttribute

          public void setArtifactNamespaceAttribute(String artifactNamespaceAttribute)

      Method to set the attribute that specifies the artifact namespace.
      Parameters:
        `artifactNamespaceAttribute` - the attribute that specifies the artifact namespace.

    - #### getUniqueAttributes

          public List<String> getUniqueAttributes()

    - #### setUniqueAttributes

          public void setUniqueAttributes(List<String> uniqueAttributes)

    - #### getArtifactElementRoot

          public String getArtifactElementRoot()

      Method to obtain the name of the root element of an XML governance artifact.
      Returns:
        the name of the root element of an XML governance artifact.

    - #### setArtifactElementRoot

          public void setArtifactElementRoot(String artifactElementRoot)

      Method to set the name of the root element of an XML governance artifact.
      Parameters:
        `artifactElementRoot` - the name of the root element of an XML governance artifact.

    - #### getArtifactElementNamespace

          public String getArtifactElementNamespace()

      Method to obtain the namespace of the root element of an XML governance artifact.
      Returns:
        the namespace of the root element of an XML governance artifact.

    - #### setArtifactElementNamespace

          public void setArtifactElementNamespace(String artifactElementNamespace)

      Method to set the namespace of the root element of an XML governance artifact.
      Parameters:
        `artifactElementNamespace` - the namespace of the root element of an XML governance artifact.

    - #### getRelationshipDefinitions

          public org.wso2.carbon.registry.core.Association[] getRelationshipDefinitions()

      Method to retrieve the relationship details.
      Returns:
        the relationship details.

    - #### setRelationshipDefinitions

          public void setRelationshipDefinitions(org.wso2.carbon.registry.core.Association[] relationships)

      Method to set the relationship details.
      Parameters:
        `relationships` - the relationship details.

    - #### getContentDefinition

          public org.apache.axiom.om.OMElement getContentDefinition()

      Method to obtain the content definition element.
      Returns:
        the content definition element.

    - #### setContentDefinition

          public void setContentDefinition(org.apache.axiom.om.OMElement contentDefinition)

      Method to set the content definition element.
      Parameters:
        `contentDefinition` - the content definition element.

    - #### getUIConfigurations

          public org.apache.axiom.om.OMElement getUIConfigurations()

      Method to obtain the UI configurations element.
      Returns:
        the UI configurations element.

    - #### setUIConfigurations

          public void setUIConfigurations(org.apache.axiom.om.OMElement uiConfigurations)

      Method to set the UI configurations element.
      Parameters:
        `uiConfigurations` - the UI configurations element.

    - #### getUIPermissions

          public org.wso2.carbon.utils.component.xml.config.ManagementPermission[] getUIPermissions()

      Method to obtain the UI permissions element.
      Returns:
        the UI permissions element.

    - #### setUIPermissions

          public void setUIPermissions(org.wso2.carbon.utils.component.xml.config.ManagementPermission[] uiPermissions)

      Method to set the UI permissions element.
      Parameters:
        `uiPermissions` - the UI permissions element.

    - #### setUIListConfigurations

          public void setUIListConfigurations(org.apache.axiom.om.OMElement listConfigurations)

      Method to set the configuration for the artifact list UI.
      Parameters:
        `listConfigurations` - the configuration for the artifact list UI.

    - #### getKey

          public String getKey()

      Method to obtain the key that can be used to locate an artifact.
      Returns:
        the key that can be used to locate an artifact.

    - #### setKey

          public void setKey(String key)

      Method to set the key that can be used to locate an artifact.
      Parameters:
        `key` - the key that can be used to locate an artifact.

    - #### getSingularLabel

          public String getSingularLabel()

      Method to obtain the label used in singular representations of the artifact.
      Returns:
        the label used in singular representations of the artifact.

    - #### setSingularLabel

          public void setSingularLabel(String singularLabel)

      Method to set the label used in singular representations of the artifact.
      Parameters:
        `singularLabel` - the label used in singular representations of the artifact.

    - #### getPluralLabel

          public String getPluralLabel()

      Method to obtain the label used in plural representations of the artifact.
      Returns:
        the label used in plural representations of the artifact.

    - #### setPluralLabel

          public void setPluralLabel(String pluralLabel)

      Method to set the label used in plural representations of the artifact.
      Parameters:
        `pluralLabel` - the label used in plural representations of the artifact.

    - #### getPathExpression

          public String getPathExpression()

      Method to obtain the expression that can be used to compute where to store the artifact.
      Returns:
        the expression that can be used to compute where to store the artifact.

    - #### setPathExpression

          public void setPathExpression(String pathExpression)

      Method to set the expression that can be used to compute where to store the artifact.
      Parameters:
        `pathExpression` - the expression that can be used to compute where to store the artifact.

    - #### getLifecycle

          public String getLifecycle()

      Method to obtain the lifecycle associated with the artifact configuration
      Returns:
        Lifecycle name associated with the artifact configuration

    - #### getTaxonomy

          public Map<String,Map<String,Boolean>> getTaxonomy()

      Method to obtain the taxonomy associated with the artifact configuration
      Returns:
        taxonomy name associated with the artifact configuration

    - #### getLifeCycleOfContext

          public String getLifeCycleOfContext(String context)

      Parameters:
        `context` - name of the context which life cycle is needed
      Returns:
        lifecycle name of the context. Or the default attached lifecycle

    - #### addLifeCycleToContext

          public void addLifeCycleToContext(String context,
                                            String lcName)

      Parameters:
        `context` - context name
        `lcName` - life-cyle name

    - #### setLifecycle

          public void setLifecycle(String lifecycle)

      Method to associate lifecycle with the artifact configuration
      Parameters:
        `lifecycle` - Name of the lifecycle associated with the artifact configuration

    - #### setTaxonomy

          public void setTaxonomy(String taxonomyName,
                                  Boolean disable,
                                  Boolean isGlobal)

      Method to associate taxonomy with the artifact configuration
      Parameters:
        `taxonomyName` - Name of the taxonomy associated with the artifact configuration

    - #### getKeysOnListUI

          public String[] getKeysOnListUI()

      Method to obtain the list of keys that will be used to generate the artifact list UI.
      Returns:
        the list of keys that will be used to generate the artifact list UI.

    - #### getNamesOnListUI

          public String[] getNamesOnListUI()

      Method to obtain the list of names that will be displayed on the artifact list UI.
      Returns:
        the list of names that will be displayed on the artifact list UI.

    - #### getTypesOnListUI

          public String[] getTypesOnListUI()

      Method to obtain the list of types that will be used to populate the content on the artifact list UI.
      Returns:
        the list of types that will be used to populate the content on the artifact list UI.

    - #### getExpressionsOnListUI

          public String[] getExpressionsOnListUI()

      Method to obtain the list of expressions that will be used to populate the content on the artifact list UI.
      Returns:
        the list of expressions that will be used to populate the content on the artifact list UI.

    - #### getValidationAttributes

          public List<Map> getValidationAttributes()

      Method to obtain the list of keys, in the form used in GovernanceArtifact getAttributes/setAttributes methods, for attributes need to be regex validated.
      Returns:
        list of keys in the form used in GovernanceArtifact getAttributes/setAttributes methods

    - #### getMandatoryAttributes

          public List<Map> getMandatoryAttributes()

      Method to get a list of maps containing mandatory fields for a given artifact
      Returns:
        A list of maps containing mandatory fields for a given artifact

    - #### setUniqueAttributes

          protected void setUniqueAttributes()

Copyright © 2017 WSO2. All Rights Reserved.