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 Description static StringENTRY_FIELDstatic StringTEXT_FIELD
-
Constructor Summary
Constructors Constructor Description GovernanceArtifactConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLifeCycleToContext(String context, String lcName)StringgetArtifactElementNamespace()Method to obtain the namespace of the root element of an XML governance artifact.StringgetArtifactElementRoot()Method to obtain the name of the root element of an XML governance artifact.StringgetArtifactNameAttribute()Method to obtain the attribute that specifies the artifact name.StringgetArtifactNamespaceAttribute()Method to obtain the attribute that specifies the artifact namespace.org.apache.axiom.om.OMElementgetContentDefinition()Method to obtain the content definition element.StringgetContentURL()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.StringgetExtension()Method to obtain the extension.StringgetGroupingAttribute()Returns the grouping attributeintgetIconSet()Method to obtain the icon set to be used.StringgetKey()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.StringgetLifecycle()Method to obtain the lifecycle associated with the artifact configurationStringgetLifeCycleOfContext(String context)List<Map>getMandatoryAttributes()Method to get a list of maps containing mandatory fields for a given artifactStringgetMediaType()Method to obtain the media type.String[]getNamesOnListUI()Method to obtain the list of names that will be displayed on the artifact list UI.StringgetPathExpression()Method to obtain the expression that can be used to compute where to store the artifact.StringgetPluralLabel()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.StringgetSingularLabel()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 configurationString[]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.OMElementgetUIConfigurations()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.booleanhasNamespace()Method to get whether namespace exists.voidsetArtifactElementNamespace(String artifactElementNamespace)Method to set the namespace of the root element of an XML governance artifact.voidsetArtifactElementRoot(String artifactElementRoot)Method to set the name of the root element of an XML governance artifact.voidsetArtifactNameAttribute(String artifactNameAttribute)Method to set the attribute that specifies the artifact name.voidsetArtifactNamespaceAttribute(String artifactNamespaceAttribute)Method to set the attribute that specifies the artifact namespace.voidsetContentDefinition(org.apache.axiom.om.OMElement contentDefinition)Method to set the content definition element.voidsetContentURL(String contentURL)Method to set the content URL.voidsetExtension(String extension)Method to set the extension.voidsetGroupingAttribute(String groupingAttribute)voidsetHasNamespace(boolean hasNamespace)Method to set whether namespace exists.voidsetIconSet(int iconSet)Method to set the icon set to be used.voidsetKey(String key)Method to set the key that can be used to locate an artifact.voidsetLifecycle(String lifecycle)Method to associate lifecycle with the artifact configurationvoidsetMediaType(String mediaType)Method to set the media type.voidsetPathExpression(String pathExpression)Method to set the expression that can be used to compute where to store the artifact.voidsetPluralLabel(String pluralLabel)Method to set the label used in plural representations of the artifact.voidsetRelationshipDefinitions(org.wso2.carbon.registry.core.Association[] relationships)Method to set the relationship details.voidsetSingularLabel(String singularLabel)Method to set the label used in singular representations of the artifact.voidsetTaxonomy(String taxonomyName, Boolean disable, Boolean isGlobal)Method to associate taxonomy with the artifact configurationvoidsetUIConfigurations(org.apache.axiom.om.OMElement uiConfigurations)Method to set the UI configurations element.voidsetUIListConfigurations(org.apache.axiom.om.OMElement listConfigurations)Method to set the configuration for the artifact list UI.voidsetUIPermissions(org.wso2.carbon.utils.component.xml.config.ManagementPermission[] uiPermissions)Method to set the UI permissions element.protected voidsetUniqueAttributes()voidsetUniqueAttributes(List<String> uniqueAttributes)
-
-
-
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
-
-
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.
-
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 namelcName- 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()
-
-