org.openwms.core.domain.system.usermanagement
Class Grant

java.lang.Object
  extended by org.openwms.core.domain.AbstractEntity
      extended by org.openwms.core.domain.system.usermanagement.SecurityObject
          extended by org.openwms.core.domain.system.usermanagement.Grant
All Implemented Interfaces:
Serializable, DomainObject<Long>

public class Grant
extends SecurityObject

A Grant gives permission to access some kind of application object. Grants to security aware application objects can be permitted or denied for a certain Role, depending on the security configuration. Usually Grants are assigned to a Role and on or more User s are assigned to each Roles. A Grant is security aware, that means it is an concrete SecurityObject.

Permissions to UI actions are managed with Grants.

Since:
0.1
Version:
$Revision: 1595 $
Author:
Heiko Scherrer
See Also:
User, Role, SecurityObject, Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.openwms.core.domain.AbstractEntity
AbstractEntity.AbstractEntityListener
 
Field Summary
 
Fields inherited from class org.openwms.core.domain.system.usermanagement.SecurityObject
NQ_FIND_ALL, NQ_FIND_BY_UNIQUE_QUERY
 
Fields inherited from class org.openwms.core.domain.AbstractEntity
FIND_ALL, FIND_BY_ID
 
Constructor Summary
Grant()
          Create a new Grant.
Grant(String name)
          Create a new Grant.
Grant(String name, String description)
          Create a new Grant.
 
Method Summary
 boolean equals(Object obj)
           Compare the uid property field.
 int hashCode()
           Use the uid to calculate the hashCode.
 
Methods inherited from class org.openwms.core.domain.system.usermanagement.SecurityObject
getDescription, getId, getName, getVersion, isNew, setDescription, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Grant

public Grant()
Create a new Grant.


Grant

public Grant(String name,
             String description)
Create a new Grant.

Parameters:
name - The name of the Grant
description - The description text of the Grant

Grant

public Grant(String name)
Create a new Grant.

Parameters:
name - The name of the Grant
Method Detail

hashCode

public int hashCode()
Use the uid to calculate the hashCode. Use the hashCode of the superclass with the hashCode of 'GRANT' to distinguish between Grants and other SecurityObjects like Roles.

Overrides:
hashCode in class SecurityObject
See Also:
SecurityObject.hashCode()

equals

public boolean equals(Object obj)
Compare the uid property field. Compare the name.

Overrides:
equals in class SecurityObject
See Also:
SecurityObject.equals(java.lang.Object)


Copyright © 2005-2011 openwms.org. All Rights Reserved.