uPortal 2.4.1
API Documentation

org.jasig.portal.groups
Class CompositeEntityIdentifier

java.lang.Object
  extended byorg.jasig.portal.EntityIdentifier
      extended byorg.jasig.portal.groups.CompositeEntityIdentifier
All Implemented Interfaces:
IGroupConstants, java.io.Serializable
Direct Known Subclasses:
CompositeServiceIdentifier

public class CompositeEntityIdentifier
extends EntityIdentifier
implements IGroupConstants

A composite key and type that uniquely identify a portal entity. The composite key contains a service name, which may be compound, and a native key, which is the key that identifies the entity in the local service.

Version:
$Revision: 1.6 $
Author:
Dan Ellentuck
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jasig.portal.groups.IGroupConstants
CHANNEL_CATEGORIES, CONTAINS, ENDS_WITH, EVERYONE, IS, NODE_SEPARATOR, PORTAL_ADMINISTRATORS, STARTS_WITH
 
Constructor Summary
CompositeEntityIdentifier(java.lang.String entityKey, java.lang.Class entityType)
           
 
Method Summary
 java.lang.String getKey()
           
 java.lang.String getLocalKey()
           
 javax.naming.Name getServiceName()
          If the composite key is either empty or has a single node, there is no service name.
static javax.naming.Name newCompoundName()
          Returns a new empty CompoundName
static javax.naming.Name parseCompoundKey(java.lang.String key)
          Returns a CompoundName parsed from key
 java.lang.String popNode()
           
 javax.naming.Name pushNode(java.lang.String newNode)
           
 void setCompositeKey(javax.naming.Name newCompositeKey)
           
 void setServiceName(javax.naming.Name newServiceName)
           
 java.lang.String toString()
          Returns a String that represents the value of this object.
 
Methods inherited from class org.jasig.portal.EntityIdentifier
equals, getType, hashCode
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CompositeEntityIdentifier

public CompositeEntityIdentifier(java.lang.String entityKey,
                                 java.lang.Class entityType)
                          throws GroupsException
Parameters:
entityKey - java.lang.String
entityType - java.lang.Class
Method Detail

getKey

public java.lang.String getKey()
Overrides:
getKey in class EntityIdentifier
Returns:
java.lang.String

getLocalKey

public java.lang.String getLocalKey()
Returns:
java.lang.String

getServiceName

public javax.naming.Name getServiceName()
If the composite key is either empty or has a single node, there is no service name.

Returns:
javax.naming.Name

newCompoundName

public static javax.naming.Name newCompoundName()
                                         throws javax.naming.InvalidNameException
Returns a new empty CompoundName

Throws:
javax.naming.InvalidNameException

popNode

public java.lang.String popNode()
                         throws javax.naming.InvalidNameException
Returns:
String - the removed component
Throws:
javax.naming.InvalidNameException

pushNode

public javax.naming.Name pushNode(java.lang.String newNode)
                           throws javax.naming.InvalidNameException
Returns:
javax.naming.Name
Throws:
javax.naming.InvalidNameException

setCompositeKey

public void setCompositeKey(javax.naming.Name newCompositeKey)
Parameters:
newCompositeKey - javax.naming.Name

setServiceName

public void setServiceName(javax.naming.Name newServiceName)
                    throws javax.naming.InvalidNameException
Parameters:
newServiceName - javax.naming.Name
Throws:
javax.naming.InvalidNameException

toString

public java.lang.String toString()
Returns a String that represents the value of this object.

Overrides:
toString in class EntityIdentifier
Returns:
java.lang.String

parseCompoundKey

public static javax.naming.Name parseCompoundKey(java.lang.String key)
                                          throws javax.naming.NamingException
Returns a CompoundName parsed from key

Throws:
javax.naming.NamingException

uPortal 2.4.1
API Documentation