org.outerj.daisy.repository.commonimpl.user
Class RoleImpl

java.lang.Object
  extended by org.outerj.daisy.repository.commonimpl.user.RoleImpl
All Implemented Interfaces:
org.outerj.daisy.repository.user.Role

public class RoleImpl
extends java.lang.Object
implements org.outerj.daisy.repository.user.Role

An administrative role object.

It is possible to change the role name before the object is persisted. After the save() method is called (i.e. persistence has happened), the rolename can no longer be changed!


Nested Class Summary
 class RoleImpl.IntimateAccess
           
 
Field Summary
 
Fields inherited from interface org.outerj.daisy.repository.user.Role
ADMINISTRATOR
 
Constructor Summary
RoleImpl(UserManagementStrategy userManagementStrategy, java.lang.String roleName, AuthenticatedUser requestingUser)
           
 
Method Summary
 java.lang.String getDescription()
           
 long getId()
           
 RoleImpl.IntimateAccess getIntimateAccess(UserManagementStrategy strategy)
          request intimate access to this object, only the strategy that created this object is allowed to actually get this intimate access.
 java.util.Date getLastModified()
           
 long getLastModifier()
           
 java.lang.String getName()
           
 long getUpdateCount()
           
 org.outerx.daisy.x10.RoleDocument getXml()
          return the xml representation of this Role
 void makeReadOnly()
          Disables all operations that can modify the state of this object.
 void save()
          persists the state of this object to the data store
 void setDescription(java.lang.String description)
           
 void setName(java.lang.String roleName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RoleImpl

public RoleImpl(UserManagementStrategy userManagementStrategy,
                java.lang.String roleName,
                AuthenticatedUser requestingUser)
Parameters:
userManagementStrategy -
roleName -
Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface org.outerj.daisy.repository.user.Role

setName

public void setName(java.lang.String roleName)
Specified by:
setName in interface org.outerj.daisy.repository.user.Role

getDescription

public java.lang.String getDescription()
Specified by:
getDescription in interface org.outerj.daisy.repository.user.Role

setDescription

public void setDescription(java.lang.String description)
Specified by:
setDescription in interface org.outerj.daisy.repository.user.Role

getId

public long getId()
Specified by:
getId in interface org.outerj.daisy.repository.user.Role

save

public void save()
          throws org.outerj.daisy.repository.RepositoryException
persists the state of this object to the data store

Specified by:
save in interface org.outerj.daisy.repository.user.Role
Throws:
org.outerj.daisy.repository.RepositoryException

getXml

public org.outerx.daisy.x10.RoleDocument getXml()
return the xml representation of this Role

Specified by:
getXml in interface org.outerj.daisy.repository.user.Role

getIntimateAccess

public RoleImpl.IntimateAccess getIntimateAccess(UserManagementStrategy strategy)
request intimate access to this object, only the strategy that created this object is allowed to actually get this intimate access.

Parameters:
strategy -
Returns:

getLastModified

public java.util.Date getLastModified()
Specified by:
getLastModified in interface org.outerj.daisy.repository.user.Role

getLastModifier

public long getLastModifier()
Specified by:
getLastModifier in interface org.outerj.daisy.repository.user.Role

getUpdateCount

public long getUpdateCount()
Specified by:
getUpdateCount in interface org.outerj.daisy.repository.user.Role

makeReadOnly

public void makeReadOnly()
Disables all operations that can modify the state of this object.



Copyright © -2012 . All Rights Reserved.