org.apache.lenya.cms.ac.usecase.impl
Class UsecaseRoles

java.lang.Object
  extended by org.apache.lenya.cms.ac.usecase.impl.UsecaseRoles

public class UsecaseRoles
extends java.lang.Object

Class to manage roles for a usecase.

Version:
$Id: UsecaseRoles.java 562973 2007-08-05 21:44:42Z nettings $

Constructor Summary
UsecaseRoles()
          Ctor.
 
Method Summary
 void addRole(java.lang.String usecase, java.lang.String role)
           
 java.lang.String[] getRoles(java.lang.String usecaseId)
          Returns the roles for a usecase.
 java.lang.String[] getUsecaseNames()
           
 boolean hasRoles(java.lang.String usecaseId)
          Checks if a usecase has roles.
 void removeRole(java.lang.String usecase, java.lang.String role)
           
 void setRoles(java.lang.String usecaseId, java.lang.String[] roleIds)
          Sets the roles for a usecase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UsecaseRoles

public UsecaseRoles()
Ctor.

Method Detail

setRoles

public void setRoles(java.lang.String usecaseId,
                     java.lang.String[] roleIds)
Sets the roles for a usecase.

Parameters:
usecaseId - The usecase ID.
roleIds - The role IDs.

getRoles

public java.lang.String[] getRoles(java.lang.String usecaseId)
Returns the roles for a usecase. If no roles are defined for this usecase, an array of size 0 is returned.

Parameters:
usecaseId - The usecase ID.
Returns:
A role array.

hasRoles

public boolean hasRoles(java.lang.String usecaseId)
Checks if a usecase has roles.

Parameters:
usecaseId - The usecase ID.
Returns:
A boolean value.

getUsecaseNames

public java.lang.String[] getUsecaseNames()
Returns:
All available usecase names.

addRole

public void addRole(java.lang.String usecase,
                    java.lang.String role)
Parameters:
usecase - The usecase name.
role - The role ID.

removeRole

public void removeRole(java.lang.String usecase,
                       java.lang.String role)
Parameters:
usecase - The usecase.
role - The role.


Copyright $ Apache Software Foundation. All Rights Reserved.