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 void
addChildRole(String string)
Method addChildRole.void
addChildTemplate(String string)
Method addChildTemplate.void
addParentRole(String string)
Method addParentRole.void
addParentTemplate(String string)
Method addParentTemplate.void
addPermission(ModelPermission modelPermission)
Method addPermission.boolean
equals(Object other)
Method equals.List<String>
getChildRoles()
Method getChildRoles.List<String>
getChildTemplates()
Method getChildTemplates.String
getDelimiter()
Get the delimiter field.String
getDescription()
Get description of this role.String
getId()
Get the id field.String
getNamePrefix()
Get the namePrefix field.List<String>
getParentRoles()
Method getParentRoles.List<String>
getParentTemplates()
Method getParentTemplates.List<ModelPermission>
getPermissions()
Method getPermissions.int
hashCode()
Method hashCode.boolean
isAssignable()
Get boolean specifying if a given role can assigned.boolean
isPermanent()
Get boolean specifying if a given role can be removed once created.boolean
isPermanentResource()
Get boolean specifying if the resource generated with this template can be removed once created.void
removeChildRole(String string)
Method removeChildRole.void
removeChildTemplate(String string)
Method removeChildTemplate.void
removeParentRole(String string)
Method removeParentRole.void
removeParentTemplate(String string)
Method removeParentTemplate.void
removePermission(ModelPermission modelPermission)
Method removePermission.void
setAssignable(boolean assignable)
Set boolean specifying if a given role can assigned.void
setChildRoles(List<String> childRoles)
Set the id of other role profiles to assign as children to this role, can accept 'foo - ${resource}'.void
setChildTemplates(List<String> childTemplates)
Set the id of other templates to assign as children to this role, can accept 'foo - ${resource}'.void
setDelimiter(String delimiter)
Set the delimiter field.void
setDescription(String description)
Set description of this role.void
setId(String id)
Set the id field.void
setNamePrefix(String namePrefix)
Set the namePrefix field.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}'.void
setParentTemplates(List<String> parentTemplates)
Set the id of other templates to have create a child relationship to this role, can accept 'foo - ${resource}'.void
setPermanent(boolean permanent)
Set boolean specifying if a given role can be removed once created.void
setPermanentResource(boolean permanentResource)
Set boolean specifying if the resource generated with this template can be removed once created.void
setPermissions(List<ModelPermission> permissions)
Set the permissions field.String
toString()
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
-
-
-