com.arsdigita.portalserver
Class Role

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.kernel.Party
                  extended bycom.arsdigita.kernel.Group
                      extended bycom.arsdigita.portalserver.Role

public class Role
extends com.arsdigita.kernel.Group


Field Summary
static String BASE_DATA_OBJECT_TYPE
           
static String MEMBER_TYPE
           
static String versionId
           
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE
 
Constructor Summary
  Role(BigDecimal id)
           
  Role(com.arsdigita.persistence.DataObject obj)
           
  Role(com.arsdigita.persistence.OID oid)
           
protected Role(PortalSite psite, String roleName, String assigneeTitle, String description, boolean isSystem)
           
 
Method Summary
protected  void afterSave()
           
static Role createRole(PortalSite psite, String roleName, String assigneeTitle, String description)
          Creates a user defined role, as opposed to a system role.
static Role createRole(PortalSite psite, String roleName, String assigneeTitle, String description, boolean isSystem)
          Creates a role in the specified portal.
static Role createRole(PortalSite psite, String roleName, String assigneeTitle, String description, boolean isSystem, String roleType)
           
 void delete()
          Delete the Role.
 String getAssigneeTitle()
           
protected  String getBaseDataObjectType()
           
 String getDescription()
           
 PortalSite getPortalSite()
           
 String getRoleName()
           
 boolean isSystem()
          Returns whether or not this is a system role.
 void setAssigneeTitle(String title)
           
 void setDescription(String description)
           
 void setRoleName(String roleName)
          Modify the role name.
 
Methods inherited from class com.arsdigita.kernel.Group
addMember, addMemberOrSubgroup, addSubgroup, addSupergroup, beforeSave, clearMembers, clearSubgroups, clearSupergroups, countAllMembers, countAllSubgroups, countMembers, countSubgroups, createRole, getAllContainedParties, getAllMembers, getAllMemberUsers, getAllSubgroups, getAllSupergroups, getContainedParties, getMembers, getMemberUsers, getName, getOrderedRoles, getRole, getRoles, getSubgroups, getSupergroups, hasDirectMember, hasDirectMemberOrSubgroup, hasDirectSubgroup, hasMember, hasSubgroup, isEmpty, removeMember, removeMemberOrSubgroup, removeSubgroup, removeSupergroup, retrieveAll, setName
 
Methods inherited from class com.arsdigita.kernel.Party
addEmailAddress, getAlternateEmails, getDisplayName, getEmailAddresses, getPrimaryEmail, getURI, removeEmailAddress, retrieveAllParties, setPrimaryEmail, setURI
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, isContainerModified, setID, setID
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, beforeDelete, clear, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

versionId

public static final String versionId
See Also:
Constant Field Values

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
See Also:
Constant Field Values

MEMBER_TYPE

public static final String MEMBER_TYPE
See Also:
Constant Field Values
Constructor Detail

Role

public Role(com.arsdigita.persistence.DataObject obj)

Role

public Role(com.arsdigita.persistence.OID oid)
     throws com.arsdigita.domain.DataObjectNotFoundException

Role

public Role(BigDecimal id)
     throws com.arsdigita.domain.DataObjectNotFoundException

Role

protected Role(PortalSite psite,
               String roleName,
               String assigneeTitle,
               String description,
               boolean isSystem)
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()

createRole

public static Role createRole(PortalSite psite,
                              String roleName,
                              String assigneeTitle,
                              String description)
Creates a user defined role, as opposed to a system role.


createRole

public static Role createRole(PortalSite psite,
                              String roleName,
                              String assigneeTitle,
                              String description,
                              boolean isSystem)
Creates a role in the specified portal.

Parameters:
roleName - the name of the role to be created
isSystem - whether or not the role should be created as a system role.

createRole

public static Role createRole(PortalSite psite,
                              String roleName,
                              String assigneeTitle,
                              String description,
                              boolean isSystem,
                              String roleType)

getRoleName

public String getRoleName()

setRoleName

public void setRoleName(String roleName)
Modify the role name. This will also change the group name to appropriately reflect the new role name and the workspace title. The role name of a system role can not be modified.

Throws:
RuntimeException - when this is a system role

getAssigneeTitle

public String getAssigneeTitle()

setAssigneeTitle

public void setAssigneeTitle(String title)

getDescription

public String getDescription()

setDescription

public void setDescription(String description)

getPortalSite

public PortalSite getPortalSite()

isSystem

public boolean isSystem()
Returns whether or not this is a system role. A system role can not have its name changed, and can not be deleted.

Returns:
whether or not this is a system role

delete

public void delete()

Delete the Role. This method removes all members and subgroups of the Role, and revokes all permission grants.


afterSave

protected void afterSave()


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2344 UTC