org.usergrid.persistence
Class SimpleRoleRef

java.lang.Object
  extended by org.usergrid.persistence.SimpleRoleRef
All Implemented Interfaces:
EntityRef, RoleRef

public class SimpleRoleRef
extends Object
implements RoleRef


Field Summary
protected  UUID groupId
           
protected  UUID id
           
protected  String roleName
           
 
Constructor Summary
SimpleRoleRef(String roleName)
           
SimpleRoleRef(UUID groupId, String roleName)
           
 
Method Summary
static SimpleRoleRef forGroupIdAndRoleName(UUID groupId, String roleName)
           
static SimpleRoleRef forRoleEntity(Entity role)
           
static SimpleRoleRef forRoleName(String roleName)
           
 String getApplicationRoleName()
           
 UUID getGroupId()
           
 EntityRef getGroupRef()
           
static UUID getIdForGroupIdAndRoleName(UUID groupId, String roleName)
           
static UUID getIdForRoleName(String roleName)
           
 String getRoleName()
           
 String getType()
          Gets the type.
 UUID getUuid()
          Gets the id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupId

protected final UUID groupId

roleName

protected final String roleName

id

protected final UUID id
Constructor Detail

SimpleRoleRef

public SimpleRoleRef(String roleName)

SimpleRoleRef

public SimpleRoleRef(UUID groupId,
                     String roleName)
Method Detail

forRoleEntity

public static SimpleRoleRef forRoleEntity(Entity role)

forRoleName

public static SimpleRoleRef forRoleName(String roleName)

forGroupIdAndRoleName

public static SimpleRoleRef forGroupIdAndRoleName(UUID groupId,
                                                  String roleName)

getIdForRoleName

public static UUID getIdForRoleName(String roleName)

getIdForGroupIdAndRoleName

public static UUID getIdForGroupIdAndRoleName(UUID groupId,
                                              String roleName)

getUuid

public UUID getUuid()
Description copied from interface: EntityRef
Gets the id.

Specified by:
getUuid in interface EntityRef
Returns:
the id

getType

public String getType()
Description copied from interface: EntityRef
Gets the type.

Specified by:
getType in interface EntityRef
Returns:
the type

getGroupRef

public EntityRef getGroupRef()
Specified by:
getGroupRef in interface RoleRef

getRoleName

public String getRoleName()
Specified by:
getRoleName in interface RoleRef

getGroupId

public UUID getGroupId()
Specified by:
getGroupId in interface RoleRef

getApplicationRoleName

public String getApplicationRoleName()
Specified by:
getApplicationRoleName in interface RoleRef


Copyright © 2013. All Rights Reserved.