org.sakaiproject.service.legacy.entity
Interface Entity

All Known Subinterfaces:
Alias, AliasEdit, AnnouncementChannel, AnnouncementChannelEdit, AnnouncementMessage, AnnouncementMessageEdit, Assignment, AssignmentContent, AssignmentContentEdit, AssignmentEdit, AssignmentSubmission, AssignmentSubmissionEdit, AuthzGroup, Calendar, CalendarEdit, CalendarEvent, CalendarEventEdit, ChatChannel, ChatChannelEdit, ChatMessage, ChatMessageEdit, ContentCollection, ContentCollectionEdit, ContentResource, ContentResourceEdit, Digest, DigestEdit, DiscussionChannel, DiscussionChannelEdit, DiscussionMessage, DiscussionMessageEdit, Edit, Group, MailArchiveChannel, MailArchiveChannelEdit, MailArchiveMessage, MailArchiveMessageEdit, Message, MessageChannel, MessageChannelEdit, MessageEdit, Notification, NotificationEdit, Preferences, PreferencesEdit, Site, SitePage, User, UserEdit
All Known Implementing Classes:
AnnouncementAction.AnnouncementWrapper, BaseAliasService.BaseAliasEdit, BaseAnnouncementService.BaseAnnouncementChannelEdit, BaseAnnouncementService.BaseAnnouncementMessageEdit, BaseAssignmentService.BaseAssignment, BaseAssignmentService.BaseAssignmentContent, BaseAssignmentService.BaseAssignmentContentEdit, BaseAssignmentService.BaseAssignmentEdit, BaseAssignmentService.BaseAssignmentSubmission, BaseAssignmentService.BaseAssignmentSubmissionEdit, BaseAuthzGroup, BaseCalendarService.BaseCalendarEdit, BaseCalendarService.BaseCalendarEventEdit, BaseChatService.BaseChatChannelEdit, BaseChatService.BaseChatMessageEdit, BaseContentService.BaseCollectionEdit, BaseContentService.BaseResourceEdit, BaseDigestService.BaseDigest, BaseDiscussionService.BaseDiscussionChannelEdit, BaseDiscussionService.BaseDiscussionMessageEdit, BaseGroup, BaseMailArchiveService.BaseMailArchiveChannelEdit, BaseMailArchiveService.BaseMailArchiveMessageEdit, BaseMessageService.BaseMessageChannelEdit, BaseMessageService.BaseMessageEdit, BaseNotificationService.BaseNotification, BaseNotificationService.BaseNotificationEdit, BasePreferencesService.BasePreferences, BaseSite, BaseSitePage, BaseUserDirectoryService.BaseUserEdit, ContentEntityWrapper, GenericCalendarImporter.PrototypeEvent, SyllabusServiceImpl.BaseResourceEdit

public interface Entity

Entity is the common interface for Sakai data entities.


Field Summary
static String SEPARATOR
          The character used to separate names in the region address path
 
Method Summary
 String getId()
          Access the id of the entity.
 ResourceProperties getProperties()
          Access the entity's properties.
 String getReference()
          Access the internal reference which can be used to access the entity from within the system.
 String getReference(String rootProperty)
          Access the alternate internal reference which can be used to access the entity from within the system.
 String getUrl()
          Access the URL which can be used to access the entity.
 String getUrl(String rootProperty)
          Access the alternate URL which can be used to access the entity.
 Element toXml(Document doc, Stack stack)
          Serialize the entity into XML, adding an element to the doc under the top of the stack element.
 

Field Detail

SEPARATOR

public static final String SEPARATOR
The character used to separate names in the region address path

See Also:
Constant Field Values
Method Detail

getUrl

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

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

getReference

public String getReference()
Access the internal reference which can be used to access the entity from within the system.

Returns:
The the internal reference which can be used to access the entity from within the system.

getUrl

public String getUrl(String rootProperty)
Access the alternate URL which can be used to access the entity.

Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference URL is requested. If null, the native 'raw' URL is requested.
Returns:
The alternate URL which can be used to access the entity.

getReference

public String getReference(String rootProperty)
Access the alternate internal reference which can be used to access the entity from within the system.

Parameters:
rootProperty - The name of the entity property whose value controls which alternate reference is requested. If null, the native 'raw' reference is requested.
Returns:
The the alternate internal reference which can be used to access the entity from within the system.

getId

public String getId()
Access the id of the entity.

Returns:
The id.

getProperties

public ResourceProperties getProperties()
Access the entity's properties.

Returns:
The entity's properties.

toXml

public Element toXml(Document doc,
                     Stack stack)
Serialize the entity into XML, adding an element to the doc under the top of the stack element.

Parameters:
doc - The DOM doc to contain the XML (or null for a string return).
stack - The DOM elements, the top of which is the containing element of the new "entity" element.
Returns:
The newly added element.