Class ModelTemplate
- java.lang.Object
-
- org.apache.archiva.redback.role.model.ModelTemplate
-
- All Implemented Interfaces:
Serializable
public class ModelTemplate extends Object implements Serializable
model templates specify a role and its corresponding permissions, child roles and parent roles to link to, however they are generated at runtime with additional input .- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModelTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildRole(String string)Method addChildRole.voidaddChildTemplate(String string)Method addChildTemplate.voidaddParentRole(String string)Method addParentRole.voidaddParentTemplate(String string)Method addParentTemplate.voidaddPermission(ModelPermission modelPermission)Method addPermission.booleanequals(Object other)Method equals.List<String>getChildRoles()Method getChildRoles.List<String>getChildTemplates()Method getChildTemplates.StringgetDelimiter()Get the delimiter field.StringgetDescription()Get description of this role.StringgetId()Get the id field.StringgetNamePrefix()Get the namePrefix field.List<String>getParentRoles()Method getParentRoles.List<String>getParentTemplates()Method getParentTemplates.List<ModelPermission>getPermissions()Method getPermissions.inthashCode()Method hashCode.booleanisAssignable()Get boolean specifying if a given role can assigned.booleanisPermanent()Get boolean specifying if a given role can be removed once created.booleanisPermanentResource()Get boolean specifying if the resource generated with this template can be removed once created.voidremoveChildRole(String string)Method removeChildRole.voidremoveChildTemplate(String string)Method removeChildTemplate.voidremoveParentRole(String string)Method removeParentRole.voidremoveParentTemplate(String string)Method removeParentTemplate.voidremovePermission(ModelPermission modelPermission)Method removePermission.voidsetAssignable(boolean assignable)Set boolean specifying if a given role can assigned.voidsetChildRoles(List<String> childRoles)Set the id of other role profiles to assign as children to this role, can accept 'foo - ${resource}'.voidsetChildTemplates(List<String> childTemplates)Set the id of other templates to assign as children to this role, can accept 'foo - ${resource}'.voidsetDelimiter(String delimiter)Set the delimiter field.voidsetDescription(String description)Set description of this role.voidsetId(String id)Set the id field.voidsetNamePrefix(String namePrefix)Set the namePrefix field.voidsetParentRoles(List<String> parentRoles)Set the id of other role profiles to have create a child relationship to this role, can accept 'foo - ${resource}'.voidsetParentTemplates(List<String> parentTemplates)Set the id of other templates to have create a child relationship to this role, can accept 'foo - ${resource}'.voidsetPermanent(boolean permanent)Set boolean specifying if a given role can be removed once created.voidsetPermanentResource(boolean permanentResource)Set boolean specifying if the resource generated with this template can be removed once created.voidsetPermissions(List<ModelPermission> permissions)Set the permissions field.StringtoString()Method toString.
-
-
-
Constructor Detail
-
ModelTemplate
public ModelTemplate()
-
-
Method Detail
-
addChildRole
public void addChildRole(String string)
Method addChildRole.- Parameters:
string-
-
addChildTemplate
public void addChildTemplate(String string)
Method addChildTemplate.- Parameters:
string-
-
addParentRole
public void addParentRole(String string)
Method addParentRole.- Parameters:
string-
-
addParentTemplate
public void addParentTemplate(String string)
Method addParentTemplate.- Parameters:
string-
-
addPermission
public void addPermission(ModelPermission modelPermission)
Method addPermission.- Parameters:
modelPermission-
-
getChildRoles
public List<String> getChildRoles()
Method getChildRoles.- Returns:
- List
-
getChildTemplates
public List<String> getChildTemplates()
Method getChildTemplates.- Returns:
- List
-
getDelimiter
public String getDelimiter()
Get the delimiter field.- Returns:
- String
-
getDescription
public String getDescription()
Get description of this role.- Returns:
- String
-
getNamePrefix
public String getNamePrefix()
Get the namePrefix field.- Returns:
- String
-
getParentRoles
public List<String> getParentRoles()
Method getParentRoles.- Returns:
- List
-
getParentTemplates
public List<String> getParentTemplates()
Method getParentTemplates.- Returns:
- List
-
getPermissions
public List<ModelPermission> getPermissions()
Method getPermissions.- Returns:
- List
-
isAssignable
public boolean isAssignable()
Get boolean specifying if a given role can assigned.- Returns:
- boolean
-
isPermanent
public boolean isPermanent()
Get boolean specifying if a given role can be removed once created.- Returns:
- boolean
-
isPermanentResource
public boolean isPermanentResource()
Get boolean specifying if the resource generated with this template can be removed once created.- Returns:
- boolean
-
removeChildRole
public void removeChildRole(String string)
Method removeChildRole.- Parameters:
string-
-
removeChildTemplate
public void removeChildTemplate(String string)
Method removeChildTemplate.- Parameters:
string-
-
removeParentRole
public void removeParentRole(String string)
Method removeParentRole.- Parameters:
string-
-
removeParentTemplate
public void removeParentTemplate(String string)
Method removeParentTemplate.- Parameters:
string-
-
removePermission
public void removePermission(ModelPermission modelPermission)
Method removePermission.- Parameters:
modelPermission-
-
setAssignable
public void setAssignable(boolean assignable)
Set boolean specifying if a given role can assigned.- Parameters:
assignable-
-
setChildRoles
public void setChildRoles(List<String> childRoles)
Set the id of other role profiles to assign as children to this role, can accept 'foo - ${resource}'.- Parameters:
childRoles-
-
setChildTemplates
public void setChildTemplates(List<String> childTemplates)
Set the id of other templates to assign as children to this role, can accept 'foo - ${resource}'.- Parameters:
childTemplates-
-
setDelimiter
public void setDelimiter(String delimiter)
Set the delimiter field.- Parameters:
delimiter-
-
setDescription
public void setDescription(String description)
Set description of this role.- Parameters:
description-
-
setNamePrefix
public void setNamePrefix(String namePrefix)
Set the namePrefix field.- Parameters:
namePrefix-
-
setParentRoles
public void setParentRoles(List<String> parentRoles)
Set the id of other role profiles to have create a child relationship to this role, can accept 'foo - ${resource}'.- Parameters:
parentRoles-
-
setParentTemplates
public void setParentTemplates(List<String> parentTemplates)
Set the id of other templates to have create a child relationship to this role, can accept 'foo - ${resource}'.- Parameters:
parentTemplates-
-
setPermanent
public void setPermanent(boolean permanent)
Set boolean specifying if a given role can be removed once created.- Parameters:
permanent-
-
setPermanentResource
public void setPermanentResource(boolean permanentResource)
Set boolean specifying if the resource generated with this template can be removed once created.- Parameters:
permanentResource-
-
setPermissions
public void setPermissions(List<ModelPermission> permissions)
Set the permissions field.- Parameters:
permissions-
-
-