org.sakaiproject.component.legacy.alias
Class BaseAliasService

java.lang.Object
  extended byorg.sakaiproject.component.legacy.alias.BaseAliasService
All Implemented Interfaces:
AliasService, EntityProducer, StorageUser
Direct Known Subclasses:
DbAliasService

public abstract class BaseAliasService
extends Object
implements AliasService, StorageUser

BaseAliasService is ...

Author:
Sakai Software Development Team

Nested Class Summary
 class BaseAliasService.BaseAliasEdit
          BaseAlias is an implementation of the CHEF Alias object.
protected static interface BaseAliasService.Storage
          Storage
 
Nested classes inherited from class org.sakaiproject.service.legacy.entity.EntityProducer
EntityProducer.ChangeType
 
Field Summary
protected  int m_cacheCleanerSeconds
          The # seconds to cache gets. 0 disables the cache.
protected  int m_cacheSeconds
          The # seconds to cache gets. 0 disables the cache.
protected  Cache m_callCache
          A cache of calls to the service and the results.
protected  EntityManager m_entityManager
          Dependency: EntityManager.
protected  Logger m_logger
          Dependency: logging service
protected  MemoryService m_memoryService
          Dependency: MemoryService.
protected  String m_relativeAccessPoint
          The initial portion of a relative access point URL.
protected  ServerConfigurationService m_serverConfigurationService
          Dependency: ServerConfigurationService.
protected  BaseAliasService.Storage m_storage
          Storage manager for this service.
 
Fields inherited from interface org.sakaiproject.service.legacy.alias.AliasService
REFERENCE_ROOT, SECURE_ADD_ALIAS, SECURE_REMOVE_ALIAS, SECURE_UPDATE_ALIAS, SERVICE_NAME
 
Constructor Summary
BaseAliasService()
           
 
Method Summary
 AliasEdit add(String id)
          Add a new alias.
protected  void addLiveProperties(ResourcePropertiesEdit props)
          Create the live properties for the user.
protected  void addLiveUpdateProperties(ResourcePropertiesEdit props)
          Update the live properties for a user for when modified.
protected  String aliasId(String ref)
          Access the alias id extracted from a alias reference.
 String aliasReference(String id)
          Access the internal reference which can be used to access the resource from within the system.
 boolean allowAdd()
          Check to see if the current user can add an alias.
 boolean allowEdit(String id)
          Check to see if the current user can edit this alias.
 boolean allowRemoveAlias(String alias)
          Check to see if the current user can remove this alias.
 boolean allowRemoveTargetAliases(String target)
          Check to see if the current user can remove these aliasese for this target resource reference.
 boolean allowSetAlias(String alias, String target)
          Check if the current user has permission to set this alias.
 String archive(String siteId, Document doc, Stack stack, String archivePath, List attachments)
          Archive the resources for the given site.
 void cancel(AliasEdit edit)
          Cancel the changes made to a AliasEdit object, and release the lock.
 void commit(AliasEdit edit)
          Commit the changes made to a AliasEdit object, and release the lock.
 int countAliases()
          Count all the aliases.
 int countSearchAliases(String criteria)
          Count all the aliases that match this criteria in id or target.
 void destroy()
          Returns to uninitialized state.
 AliasEdit edit(String id)
          Get a locked alias object for editing.
protected  String getAccessPoint(boolean relative)
          Access the partial URL that forms the root of resource URLs.
 List getAliases(int first, int last)
          Find all the aliases within the record range given (sorted by id).
 List getAliases(String target)
          Find all the aliases defined for this target.
 List getAliases(String target, int first, int last)
          Find all the aliases defined for this target, within the record range given (sorted by id).
 Time getDate(Entity r)
          Access the resource date.
 Entity getEntity(Reference ref)
          Access the referenced Entity - the entity will belong to the service.
 Collection getEntityAuthzGroups(Reference ref)
          Access a collection of authorization group ids for security on the for the referenced entity - the entity will belong to the service.
 String getEntityDescription(Reference ref)
          Create an entity description for the entity referenced - the entity will belong to the service.
 ResourceProperties getEntityResourceProperties(Reference ref)
          Access the resource properties for the referenced entity - the entity will belong to the service.
 String getEntityUrl(Reference ref)
          Access a URL for the referenced entity - the entity will belong to the service.
 HttpAccess getHttpAccess()
          Get the HttpAccess object that supports entity access via the access servlet for my entities.
 String getLabel()
          
 String getOwnerId(Entity r)
          Access the resource owner user id.
 String getTarget(String alias)
          Find the target resource reference string associated with this alias.
 void importEntities(String fromContext, String toContext, List ids)
          import Entites from the source context into the destination context
 void init()
          Final initialization, once all dependencies are set.
 boolean isDraft(Entity r)
          Check if this resource is in draft mode.
 String merge(String siteId, Element root, String archivePath, String fromSiteId, Map attachmentNames, Map userIdTrans, Set userListAllowImport)
          Merge the resources from the archive into the given site.
 Entity newContainer(Element element)
          Construct a new container resource, from an XML element.
 Entity newContainer(Entity other)
          Construct a new container resource, as a copy of another
 Entity newContainer(String ref)
          Construct a new continer given just an id.
 Edit newContainerEdit(Element element)
          Construct a new container resource, from an XML element.
 Edit newContainerEdit(Entity other)
          Construct a new container resource, as a copy of another
 Edit newContainerEdit(String ref)
          Construct a new continer given just an id.
 Entity newResource(Entity container, Element element)
          Construct a new resource, from an XML element.
 Entity newResource(Entity container, Entity other)
          Construct a new resource from another resource of the same type.
 Entity newResource(Entity container, String id, Object[] others)
          Construct a new resource given just an id.
 Edit newResourceEdit(Entity container, Element element)
          Construct a new resource, from an XML element.
 Edit newResourceEdit(Entity container, Entity other)
          Construct a new resource from another resource of the same type.
 Edit newResourceEdit(Entity container, String id, Object[] others)
          Construct a new resource given just an id.
protected abstract  BaseAliasService.Storage newStorage()
          Construct storage for this service.
 boolean parseEntityReference(String reference, Reference ref)
          If the service recognizes the reference as its own, parse it and fill in the Reference
 void remove(AliasEdit edit)
          Remove this alias information - it must be a user with a lock from edit().
 void removeAlias(String alias)
          Remove an alias.
 void removeTargetAliases(String target)
          Remove all aliases for this target resource reference, if any.
 List searchAliases(String criteria, int first, int last)
          Search all the aliases that match this criteria in id or target, returning a subset of records within the record range given (sorted by id).
 void setAlias(String alias, String target)
          Allocate an alias for a resource
 void setCacheCleanerMinutes(String time)
          Set the # minutes between cache cleanings.
 void setCacheMinutes(String time)
          Set the # minutes to cache a get.
 void setEntityManager(EntityManager service)
          Dependency: EntityManager.
 void setLogger(Logger service)
          Dependency: logging service.
 void setMemoryService(MemoryService service)
          Dependency: MemoryService.
 void setServerConfigurationService(ServerConfigurationService service)
          Dependency: ServerConfigurationService.
 Object[] storageFields(Entity r)
          Collect the fields that need to be stored outside the XML (for the resource).
 void syncWithSiteChange(Site site, EntityProducer.ChangeType change)
          Synchronize any entities related to the Site given this change in the Site, possibly a structural change where a tool is added or removed, or the site is new, or being deleted.
protected  void unlock(String lock, String resource)
          Check security permission.
protected  boolean unlockCheck(String lock, String resource)
          Check security permission.
protected  boolean unlockTargetCheck(String target)
          Check security permission, target modify based.
 boolean willArchiveMerge()
          
 boolean willImport()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_storage

protected BaseAliasService.Storage m_storage
Storage manager for this service.


m_relativeAccessPoint

protected String m_relativeAccessPoint
The initial portion of a relative access point URL.


m_callCache

protected Cache m_callCache
A cache of calls to the service and the results.


m_logger

protected Logger m_logger
Dependency: logging service


m_memoryService

protected MemoryService m_memoryService
Dependency: MemoryService.


m_serverConfigurationService

protected ServerConfigurationService m_serverConfigurationService
Dependency: ServerConfigurationService.


m_entityManager

protected EntityManager m_entityManager
Dependency: EntityManager.


m_cacheSeconds

protected int m_cacheSeconds
The # seconds to cache gets. 0 disables the cache.


m_cacheCleanerSeconds

protected int m_cacheCleanerSeconds
The # seconds to cache gets. 0 disables the cache.

Constructor Detail

BaseAliasService

public BaseAliasService()
Method Detail

newStorage

protected abstract BaseAliasService.Storage newStorage()
Construct storage for this service.


getAccessPoint

protected String getAccessPoint(boolean relative)
Access the partial URL that forms the root of resource URLs.

Parameters:
relative - if true, form within the access path only (i.e. starting with /content)
Returns:
the partial URL that forms the root of resource URLs.

aliasReference

public String aliasReference(String id)
Access the internal reference which can be used to access the resource from within the system.

Specified by:
aliasReference in interface AliasService
Parameters:
id - The alias id string.
Returns:
The the internal reference which can be used to access the resource from within the system.

aliasId

protected String aliasId(String ref)
Access the alias id extracted from a alias reference.

Parameters:
ref - The alias reference string.
Returns:
The the alias id extracted from a alias reference.

unlockCheck

protected boolean unlockCheck(String lock,
                              String resource)
Check security permission.

Parameters:
lock - The lock id string.
resource - The resource reference string, or null if no resource is involved.
Returns:
true if allowed, false if not

unlock

protected void unlock(String lock,
                      String resource)
               throws PermissionException
Check security permission.

Parameters:
lock - The lock id string.
resource - The resource reference string, or null if no resource is involved.
Throws:
PermissionException - Thrown if the user does not have access

unlockTargetCheck

protected boolean unlockTargetCheck(String target)
Check security permission, target modify based.

Parameters:
target - The target resource reference string.
Returns:
true if allowed, false if not

addLiveProperties

protected void addLiveProperties(ResourcePropertiesEdit props)
Create the live properties for the user.


addLiveUpdateProperties

protected void addLiveUpdateProperties(ResourcePropertiesEdit props)
Update the live properties for a user for when modified.


setLogger

public void setLogger(Logger service)
Dependency: logging service.

Parameters:
service - The logging service.

setMemoryService

public void setMemoryService(MemoryService service)
Dependency: MemoryService.

Parameters:
service - The MemoryService.

setServerConfigurationService

public void setServerConfigurationService(ServerConfigurationService service)
Dependency: ServerConfigurationService.

Parameters:
service - The ServerConfigurationService.

setEntityManager

public void setEntityManager(EntityManager service)
Dependency: EntityManager.

Parameters:
service - The EntityManager.

setCacheMinutes

public void setCacheMinutes(String time)
Set the # minutes to cache a get.

Parameters:
time - The # minutes to cache a get (as an integer string).

setCacheCleanerMinutes

public void setCacheCleanerMinutes(String time)
Set the # minutes between cache cleanings.

Parameters:
time - The # minutes between cache cleanings. (as an integer string).

init

public void init()
Final initialization, once all dependencies are set.


destroy

public void destroy()
Returns to uninitialized state.


allowSetAlias

public boolean allowSetAlias(String alias,
                             String target)
Check if the current user has permission to set this alias.

Specified by:
allowSetAlias in interface AliasService
Parameters:
alias - The alias.
target - The resource reference string alias target.
Returns:
true if the current user has permission to set this alias, false if not.

setAlias

public void setAlias(String alias,
                     String target)
              throws IdUsedException,
                     IdInvalidException,
                     PermissionException
Allocate an alias for a resource

Specified by:
setAlias in interface AliasService
Parameters:
alias - The alias.
target - The resource reference string alias target.
Throws:
IdUsedException - if the alias is already used.
IdInvalidException - if the alias id is invalid.
PermissionException - if the current user does not have permission to set this alias.

allowRemoveAlias

public boolean allowRemoveAlias(String alias)
Check to see if the current user can remove this alias.

Specified by:
allowRemoveAlias in interface AliasService
Parameters:
alias - The alias.
Returns:
true if the current user can remove this alias, false if not.

removeAlias

public void removeAlias(String alias)
                 throws IdUnusedException,
                        PermissionException,
                        InUseException
Remove an alias.

Specified by:
removeAlias in interface AliasService
Parameters:
alias - The alias.
Throws:
IdUnusedException - if not found.
PermissionException - if the current user does not have permission to remove this alias.
InUseException - if the Alias object is locked by someone else.

allowRemoveTargetAliases

public boolean allowRemoveTargetAliases(String target)
Check to see if the current user can remove these aliasese for this target resource reference.

Specified by:
allowRemoveTargetAliases in interface AliasService
Parameters:
target - The target resource reference string.
Returns:
true if the current user can remove these aliasese for this target resource reference, false if not.

removeTargetAliases

public void removeTargetAliases(String target)
                         throws PermissionException
Remove all aliases for this target resource reference, if any.

Specified by:
removeTargetAliases in interface AliasService
Parameters:
target - The target resource reference string.
Throws:
PermissionException - if the current user does not have permission to remove these aliases.

getTarget

public String getTarget(String alias)
                 throws IdUnusedException
Find the target resource reference string associated with this alias.

Specified by:
getTarget in interface AliasService
Parameters:
alias - The alias.
Returns:
The target resource reference string associated with this alias.
Throws:
IdUnusedException - if the alias is not defined.

getAliases

public List getAliases(String target)
Find all the aliases defined for this target.

Specified by:
getAliases in interface AliasService
Parameters:
target - The target resource reference string.
Returns:
A list (Alias) of all the aliases defined for this target.

getAliases

public List getAliases(String target,
                       int first,
                       int last)
Find all the aliases defined for this target, within the record range given (sorted by id).

Specified by:
getAliases in interface AliasService
Parameters:
target - The target resource reference string.
first - The first record position to return.
last - The last record position to return.
Returns:
A list (Alias) of all the aliases defined for this target, within the record range given (sorted by id).

getAliases

public List getAliases(int first,
                       int last)
Find all the aliases within the record range given (sorted by id).

Specified by:
getAliases in interface AliasService
Parameters:
first - The first record position to return.
last - The last record position to return.
Returns:
A list (Alias) of all the aliases within the record range given (sorted by id).

countAliases

public int countAliases()
Count all the aliases.

Specified by:
countAliases in interface AliasService
Returns:
The count of all aliases.

searchAliases

public List searchAliases(String criteria,
                          int first,
                          int last)
Search all the aliases that match this criteria in id or target, returning a subset of records within the record range given (sorted by id).

Specified by:
searchAliases in interface AliasService
Parameters:
criteria - The search criteria.
first - The first record position to return.
last - The last record position to return.
Returns:
A list (Alias) of all the aliases matching the criteria, within the record range given (sorted by id).

countSearchAliases

public int countSearchAliases(String criteria)
Count all the aliases that match this criteria in id or target.

Specified by:
countSearchAliases in interface AliasService
Returns:
The count of all aliases matching the criteria.

allowAdd

public boolean allowAdd()
Check to see if the current user can add an alias.

Specified by:
allowAdd in interface AliasService
Returns:
true if the current user can add an alias, false if not.

add

public AliasEdit add(String id)
              throws IdInvalidException,
                     IdUsedException,
                     PermissionException
Add a new alias. Must commit() to make official, or cancel() when done!

Specified by:
add in interface AliasService
Parameters:
id - The alias id.
Returns:
A locked AliasEdit object (reserving the id).
Throws:
IdInvalidException - if the alias id is invalid.
IdUsedException - if the alias id is already used.
PermissionException - if the current user does not have permission to add an alias.

allowEdit

public boolean allowEdit(String id)
Check to see if the current user can edit this alias.

Specified by:
allowEdit in interface AliasService
Parameters:
id - The alias id string.
Returns:
true if the current user can edit this alias, false if not.

edit

public AliasEdit edit(String id)
               throws IdUnusedException,
                      PermissionException,
                      InUseException
Get a locked alias object for editing. Must commit() to make official, or cancel() (or remove()) when done!

Specified by:
edit in interface AliasService
Parameters:
id - The alias id string.
Returns:
An AliasEdit object for editing.
Throws:
IdUnusedException - if not found.
PermissionException - if the current user does not have permission to mess with this alias.
InUseException - if the Alias object is locked by someone else.

commit

public void commit(AliasEdit edit)
Commit the changes made to a AliasEdit object, and release the lock. The AliasEdit is disabled, and not to be used after this call.

Specified by:
commit in interface AliasService

cancel

public void cancel(AliasEdit edit)
Cancel the changes made to a AliasEdit object, and release the lock. The AliasEdit is disabled, and not to be used after this call.

Specified by:
cancel in interface AliasService

remove

public void remove(AliasEdit edit)
            throws PermissionException
Remove this alias information - it must be a user with a lock from edit(). The AliasEdit is disabled, and not to be used after this call.

Specified by:
remove in interface AliasService
Parameters:
edit - The locked AliasEdit object to remove.
Throws:
PermissionException - if the current user does not have permission to remove this alias.

getLabel

public String getLabel()

Specified by:
getLabel in interface EntityProducer
Returns:
a short string identifying the resources kept here, good for a file name or label.

willArchiveMerge

public boolean willArchiveMerge()

Specified by:
willArchiveMerge in interface EntityProducer
Returns:
true if the serice wants to be part of archive / merge, false if not.

willImport

public boolean willImport()

Specified by:
willImport in interface EntityProducer
Returns:
true if the serice wants to be part of import, false if not.

getHttpAccess

public HttpAccess getHttpAccess()
Get the HttpAccess object that supports entity access via the access servlet for my entities.

Specified by:
getHttpAccess in interface EntityProducer
Returns:
The HttpAccess object for my entities, or null if I do not support access.

parseEntityReference

public boolean parseEntityReference(String reference,
                                    Reference ref)
If the service recognizes the reference as its own, parse it and fill in the Reference

Specified by:
parseEntityReference in interface EntityProducer
Parameters:
reference - The reference string to examine.
ref - The Reference object to set with the results of the parse from a recognized reference.
Returns:
true if the reference belonged to the service, false if not.

getEntityDescription

public String getEntityDescription(Reference ref)
Create an entity description for the entity referenced - the entity will belong to the service.

Specified by:
getEntityDescription in interface EntityProducer
Parameters:
ref - The entity reference.
Returns:
The entity description, or null if one cannot be made.

getEntityResourceProperties

public ResourceProperties getEntityResourceProperties(Reference ref)
Access the resource properties for the referenced entity - the entity will belong to the service.

Specified by:
getEntityResourceProperties in interface EntityProducer
Parameters:
ref - The entity reference.
Returns:
The ResourceProperties object for the entity, or null if it has none.

getEntity

public Entity getEntity(Reference ref)
Access the referenced Entity - the entity will belong to the service.

Specified by:
getEntity in interface EntityProducer
Parameters:
ref - The entity reference.
Returns:
The Entity, or null if not found.

getEntityAuthzGroups

public Collection getEntityAuthzGroups(Reference ref)
Access a collection of authorization group ids for security on the for the referenced entity - the entity will belong to the service.

Specified by:
getEntityAuthzGroups in interface EntityProducer
Parameters:
ref - The entity reference.
Returns:
The entity's collection of authorization group ids, or null if this cannot be done.

getEntityUrl

public String getEntityUrl(Reference ref)
Access a URL for the referenced entity - the entity will belong to the service.

Specified by:
getEntityUrl in interface EntityProducer
Parameters:
ref - The entity reference.
Returns:
The entity's URL, or null if it does not have one.

syncWithSiteChange

public void syncWithSiteChange(Site site,
                               EntityProducer.ChangeType change)
Synchronize any entities related to the Site given this change in the Site, possibly a structural change where a tool is added or removed, or the site is new, or being deleted.

Specified by:
syncWithSiteChange in interface EntityProducer
Parameters:
site - The site that has just changed.
change - The ChangeType for the site (newly added, updated, or just removed).

archive

public String archive(String siteId,
                      Document doc,
                      Stack stack,
                      String archivePath,
                      List attachments)
Archive the resources for the given site.

Specified by:
archive in interface EntityProducer
Parameters:
siteId - the id of the site.
doc - The document to contain the xml.
stack - The stack of elements, the top of which will be the containing element of the "service.name" element.
archivePath - The path to the folder where we are writing auxilary files.
attachments - A list of attachments - add to this if any attachments need to be included in the archive.
Returns:
A log of status messages from the archive.

merge

public String merge(String siteId,
                    Element root,
                    String archivePath,
                    String fromSiteId,
                    Map attachmentNames,
                    Map userIdTrans,
                    Set userListAllowImport)
Merge the resources from the archive into the given site.

Specified by:
merge in interface EntityProducer
Parameters:
siteId - The id of the site getting imported into.
root - The XML DOM tree of content to merge.
attachmentNames - A map of old attachment name (as found in the DOM) to new attachment name.
Returns:
A log of status messages from the merge.

importEntities

public void importEntities(String fromContext,
                           String toContext,
                           List ids)
import Entites from the source context into the destination context

Specified by:
importEntities in interface EntityProducer
Parameters:
fromContext - The source context
toContext - The destination context
ids - when null, all entities will be imported; otherwise, only entities with those ids will be imported

newContainer

public Entity newContainer(String ref)
Construct a new continer given just an id.

Specified by:
newContainer in interface StorageUser
Parameters:
ref - The container reference.
Returns:
The new containe Resource.

newContainer

public Entity newContainer(Element element)
Construct a new container resource, from an XML element.

Specified by:
newContainer in interface StorageUser
Parameters:
element - The XML.
Returns:
The new container resource.

newContainer

public Entity newContainer(Entity other)
Construct a new container resource, as a copy of another

Specified by:
newContainer in interface StorageUser
Parameters:
other - The other contianer to copy.
Returns:
The new container resource.

newResource

public Entity newResource(Entity container,
                          String id,
                          Object[] others)
Construct a new resource given just an id.

Specified by:
newResource in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
id - The id for the new object.
others - (options) array of objects to load into the Resource's fields.
Returns:
The new resource.

newResource

public Entity newResource(Entity container,
                          Element element)
Construct a new resource, from an XML element.

Specified by:
newResource in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
element - The XML.
Returns:
The new resource from the XML.

newResource

public Entity newResource(Entity container,
                          Entity other)
Construct a new resource from another resource of the same type.

Specified by:
newResource in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
other - The other resource.
Returns:
The new resource as a copy of the other.

newContainerEdit

public Edit newContainerEdit(String ref)
Construct a new continer given just an id.

Specified by:
newContainerEdit in interface StorageUser
Parameters:
ref - The container reference.
Returns:
The new containe Resource.

newContainerEdit

public Edit newContainerEdit(Element element)
Construct a new container resource, from an XML element.

Specified by:
newContainerEdit in interface StorageUser
Parameters:
element - The XML.
Returns:
The new container resource.

newContainerEdit

public Edit newContainerEdit(Entity other)
Construct a new container resource, as a copy of another

Specified by:
newContainerEdit in interface StorageUser
Parameters:
other - The other contianer to copy.
Returns:
The new container resource.

newResourceEdit

public Edit newResourceEdit(Entity container,
                            String id,
                            Object[] others)
Construct a new resource given just an id.

Specified by:
newResourceEdit in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
id - The id for the new object.
others - (options) array of objects to load into the Resource's fields.
Returns:
The new resource.

newResourceEdit

public Edit newResourceEdit(Entity container,
                            Element element)
Construct a new resource, from an XML element.

Specified by:
newResourceEdit in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
element - The XML.
Returns:
The new resource from the XML.

newResourceEdit

public Edit newResourceEdit(Entity container,
                            Entity other)
Construct a new resource from another resource of the same type.

Specified by:
newResourceEdit in interface StorageUser
Parameters:
container - The Resource that is the container for the new resource (may be null).
other - The other resource.
Returns:
The new resource as a copy of the other.

storageFields

public Object[] storageFields(Entity r)
Collect the fields that need to be stored outside the XML (for the resource).

Specified by:
storageFields in interface StorageUser
Returns:
An array of field values to store in the record outside the XML (for the resource).

isDraft

public boolean isDraft(Entity r)
Check if this resource is in draft mode.

Specified by:
isDraft in interface StorageUser
Parameters:
r - The resource.
Returns:
true if the resource is in draft mode, false if not.

getOwnerId

public String getOwnerId(Entity r)
Access the resource owner user id.

Specified by:
getOwnerId in interface StorageUser
Parameters:
r - The resource.
Returns:
The resource owner user id.

getDate

public Time getDate(Entity r)
Access the resource date.

Specified by:
getDate in interface StorageUser
Parameters:
r - The resource.
Returns:
The resource date.