org.sakaiproject.service.legacy.entity
Interface Reference

All Known Implementing Classes:
ReferenceComponent

public interface Reference

Reference holds a reference to a Sakai entity.

Note: a Reference is immutable.

Version:
$Revision: 3290 $
Author:
Sakai Software Development Team

Method Summary
 void addSiteContextAuthzGroup(Collection rv)
          Add the AuthzGroup(s) for context as a site.
 void addUserAuthzGroup(Collection rv, String id)
          Add the AuthzGroup for this user id, or for the user's type template, or for the general template.
 void addUserTemplateAuthzGroup(Collection rv, String id)
          Add the AuthzGroup for this user id, or for the user's type template, or for the general template.
 String getContainer()
          Access a single container id, the from most general (or only)
 String getContext()
          Access the context id, if any.
 String getDescription()
           
 Entity getEntity()
          Find the Entity that is referenced.
 EntityProducer getEntityProducer()
          Access the entity producer responsible for the referenced entity.
 String getId()
          Access the primary id.
 ResourceProperties getProperties()
          Find the ResourceProperties object for this reference.
 Collection getRealms()
          Compute the set of AuthzGroup ids associated with this referenced resource.
 String getReference()
          Access the reference.
 String getSubType()
          Access the subType.
 String getType()
          Access the type, a service id string.
 String getUrl()
          Access the URL which can be used to access the referenced resource.
 boolean isKnownType()
          Check if the reference's type is known
 boolean set(String type, String subType, String id, String container, String context)
          Accept the settings for a reference - may be rejected if already set
 

Method Detail

addSiteContextAuthzGroup

public void addSiteContextAuthzGroup(Collection rv)
Add the AuthzGroup(s) for context as a site.

Parameters:
rv - The list.

addUserAuthzGroup

public void addUserAuthzGroup(Collection rv,
                              String id)
Add the AuthzGroup for this user id, or for the user's type template, or for the general template.

Parameters:
rv - The list.
id - The user id.

addUserTemplateAuthzGroup

public void addUserTemplateAuthzGroup(Collection rv,
                                      String id)
Add the AuthzGroup for this user id, or for the user's type template, or for the general template.

Parameters:
rv - The list.
id - The user id.

getContainer

public String getContainer()
Access a single container id, the from most general (or only)

Returns:
The single or most general container, if any.

getContext

public String getContext()
Access the context id, if any.

Returns:
the context id, if any.

getDescription

public String getDescription()
Returns:
a description of the resource referenced.

getEntity

public Entity getEntity()
Find the Entity that is referenced.

Returns:
The Entity object that this references.

getId

public String getId()
Access the primary id.

Returns:
The primary id.

getProperties

public ResourceProperties getProperties()
Find the ResourceProperties object for this reference.

Returns:
A ResourcesProperties object found (or constructed) for this reference.

getRealms

public Collection getRealms()
Compute the set of AuthzGroup ids associated with this referenced resource.

Returns:
List of AuthzGroup ids (String) associated with this referenced resource.

getReference

public String getReference()
Access the reference.

Returns:
The reference.

getSubType

public String getSubType()
Access the subType.

Returns:
The subType.

getType

public String getType()
Access the type, a service id string.

Returns:
The type, a service id string.

getUrl

public String getUrl()
Access the URL which can be used to access the referenced resource.

Returns:
The URL which can be used to access the referenced resource.

isKnownType

public boolean isKnownType()
Check if the reference's type is known

Returns:
true if known, false if not.

set

public boolean set(String type,
                   String subType,
                   String id,
                   String container,
                   String context)
Accept the settings for a reference - may be rejected if already set

Parameters:
type -
subType -
id -
container -
context -
Returns:
true if settings are accepted, false if not.

getEntityProducer

public EntityProducer getEntityProducer()
Access the entity producer responsible for the referenced entity.

Returns:
The EntityProducer responsible for the referenced entity, or null if there is none.