pt.digitalis.dif.controller.security.objects
Class ACLEntry

java.lang.Object
  extended by pt.digitalis.dif.controller.security.objects.ACLEntry

public class ACLEntry
extends Object

Represents a grant on a resource for a given entity (user or group).

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt
Created on:
Dec 10, 2007

Constructor Summary
ACLEntry()
          Default ctor.
 
Method Summary
 boolean equals(Object obj)
           
 String getEntityID()
          Returns the ID of the entity associated with this entity.
 Entity getEntityType()
          Returns the entity type.
static Entity getEntityTypeFromName(String entityName)
          Converts an entity name to the appropriate Entity.
 String getGroupID()
          Returns the group ID.
static String getTypeNameFromEntity(Entity entity)
          Converts an Entity to it's type name.
 String getUserID()
          Returns the user ID.
 int hashCode()
           
 boolean isDefault()
          Checks if this is a default entry.
 boolean isEnabled()
          Checks if this entry is enabled.
 boolean isGroupACL()
          Checks if it is a group entry.
 boolean isPublicAccess()
          Checks if the entry has public access.
 boolean isUserACL()
          Checks if it is a user entry.
 void setDefault(boolean isDefault)
          Sets a new value for 'isDefault' field
 void setEnabled(boolean isEnabled)
          Sets a new value for 'isEnabled' field
 void setEntityID(String entityID)
          Sets the entity ID.
 void setEntityType(Entity entityType)
          Sets the entity type.
 void setGroupID(String groupID)
          Sets the group ID.
 void setPublicAccess()
          Sets the ACL entry as public.
 void setUserID(String userID)
          Sets the user ID.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ACLEntry

public ACLEntry()
Default ctor.

Method Detail

getEntityTypeFromName

public static Entity getEntityTypeFromName(String entityName)
Converts an entity name to the appropriate Entity.

Parameters:
entityName - the entity name
Returns:
the entity

getTypeNameFromEntity

public static String getTypeNameFromEntity(Entity entity)
Converts an Entity to it's type name.

Parameters:
entity - the entity
Returns:
the entity type name

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getEntityID

public String getEntityID()
Returns the ID of the entity associated with this entity.

Returns:
the entityID

getEntityType

public Entity getEntityType()
Returns the entity type.

Returns:
the entityType

getGroupID

public String getGroupID()
Returns the group ID.

Returns:
the groupID

getUserID

public String getUserID()
Returns the user ID.

Returns:
the userID

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

isDefault

public boolean isDefault()
Checks if this is a default entry.

Returns:
T if this entry is default, F otherwise

isEnabled

public boolean isEnabled()
Checks if this entry is enabled.

Returns:
T if this entry is enabled, F otherwise

isGroupACL

public boolean isGroupACL()
Checks if it is a group entry.

Returns:
T if it is a group grant

isPublicAccess

public boolean isPublicAccess()
Checks if the entry has public access.

Returns:
T if it's a public access entry, F otherwise

isUserACL

public boolean isUserACL()
Checks if it is a user entry.

Returns:
T if it is a user grant

setDefault

public void setDefault(boolean isDefault)
Sets a new value for 'isDefault' field

Parameters:
isDefault - the new default value

setEnabled

public void setEnabled(boolean isEnabled)
Sets a new value for 'isEnabled' field

Parameters:
isEnabled - the new 'isEnabled' value

setEntityID

public void setEntityID(String entityID)
Sets the entity ID.

Parameters:
entityID - the entityID to set

setEntityType

public void setEntityType(Entity entityType)
Sets the entity type.

Parameters:
entityType - the entityType to set

setGroupID

public void setGroupID(String groupID)
Sets the group ID.

Parameters:
groupID - the groupID to set

setPublicAccess

public void setPublicAccess()
Sets the ACL entry as public.


setUserID

public void setUserID(String userID)
Sets the user ID.

Parameters:
userID - the userID to set

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2014 Digitalis Informática Lda. All Rights Reserved.