org.sakaiproject.util.storage
Interface StorageUser

All Known Implementing Classes:
BaseAliasService, BaseAssignmentService.AssignmentContentStorageUser, BaseAssignmentService.AssignmentStorageUser, BaseAssignmentService.AssignmentSubmissionStorageUser, BaseAuthzGroupService, BaseCalendarService, BaseContentService.CollectionStorageUser, BaseContentService.ResourceStorageUser, BaseDigestService, BaseMessageService, BaseNotificationService, BasePreferencesService, BaseSiteService, BaseUserDirectoryService

public interface StorageUser

StorageUser is ...%%% callbacks from the BaseXmlFileStorage and other Storage classes...

Version:
$Revision: 2371 $
Author:
University of Michigan, CHEF Software Development Team
See Also:
org.chefproject.service.generic.UserDirectoryService

Method Summary
 Time getDate(Entity r)
          Access the resource date.
 String getOwnerId(Entity r)
          Access the resource owner user id.
 boolean isDraft(Entity r)
          Check if this resource is in draft mode.
 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 ids.
 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 ids.
 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.
 Object[] storageFields(Entity r)
          Collect the fields that need to be stored outside the XML (for the resource).
 

Method Detail

newContainer

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

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.

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

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.

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.

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.

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 ids.

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.

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

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.

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.

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.

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).

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.

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.

Parameters:
r - The resource.
Returns:
The resource owner user id.

getDate

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

Parameters:
r - The resource.
Returns:
The resource date.