org.sakaiproject.tool.gradebook.facades.sakai2impl
Class BaseEntityProducer
java.lang.Object
org.sakaiproject.tool.gradebook.facades.sakai2impl.BaseEntityProducer
- All Implemented Interfaces:
- org.sakaiproject.entity.api.EntityProducer
- Direct Known Subclasses:
- GradebookEntityProducer
public class BaseEntityProducer
- extends Object
- implements org.sakaiproject.entity.api.EntityProducer
Utility class that provides safe defaults for all EntityProducer methods.
By subclassing, developers can focus only on the methods they
actually need to customize. External configuration files can be used to
set their label, reference root, and service name. The public "init()" method can be
used to register as an EntityProducer.
|
Method Summary |
String |
archive(String siteId,
Document doc,
Stack stack,
String archivePath,
List attachments)
|
org.sakaiproject.entity.api.Entity |
getEntity(org.sakaiproject.entity.api.Reference ref)
|
Collection |
getEntityAuthzGroups(org.sakaiproject.entity.api.Reference ref,
String userId)
|
String |
getEntityDescription(org.sakaiproject.entity.api.Reference ref)
|
org.sakaiproject.entity.api.ResourceProperties |
getEntityResourceProperties(org.sakaiproject.entity.api.Reference ref)
|
String |
getEntityUrl(org.sakaiproject.entity.api.Reference ref)
|
org.sakaiproject.entity.api.HttpAccess |
getHttpAccess()
|
String |
getLabel()
|
String |
getReferenceRoot()
|
String |
getServiceName()
Although not required, the service name is frequently used. |
void |
init()
Register this class as an EntityProducer. |
String |
merge(String siteId,
Element root,
String archivePath,
String fromSiteId,
Map attachmentNames,
Map userIdTrans,
Set userListAllowImport)
|
boolean |
parseEntityReference(String reference,
org.sakaiproject.entity.api.Reference ref)
|
void |
setEntityManager(org.sakaiproject.entity.api.EntityManager entityManager)
|
void |
setLabel(String label)
|
void |
setReferenceRoot(String referenceRoot)
|
void |
setServiceName(String serviceName)
|
boolean |
willArchiveMerge()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
label
protected String label
referenceRoot
protected String referenceRoot
serviceName
protected String serviceName
entityManager
protected org.sakaiproject.entity.api.EntityManager entityManager
BaseEntityProducer
public BaseEntityProducer()
setEntityManager
public void setEntityManager(org.sakaiproject.entity.api.EntityManager entityManager)
init
public void init()
- Register this class as an EntityProducer.
setLabel
public void setLabel(String label)
getReferenceRoot
public String getReferenceRoot()
setReferenceRoot
public void setReferenceRoot(String referenceRoot)
getServiceName
public String getServiceName()
- Although not required, the service name is frequently used. As a
convenience, it's also settable by this bean.
setServiceName
public void setServiceName(String serviceName)
getLabel
public String getLabel()
- Specified by:
getLabel in interface org.sakaiproject.entity.api.EntityProducer
willArchiveMerge
public boolean willArchiveMerge()
- Specified by:
willArchiveMerge in interface org.sakaiproject.entity.api.EntityProducer
archive
public String archive(String siteId,
Document doc,
Stack stack,
String archivePath,
List attachments)
- Specified by:
archive in interface org.sakaiproject.entity.api.EntityProducer
merge
public String merge(String siteId,
Element root,
String archivePath,
String fromSiteId,
Map attachmentNames,
Map userIdTrans,
Set userListAllowImport)
- Specified by:
merge in interface org.sakaiproject.entity.api.EntityProducer
parseEntityReference
public boolean parseEntityReference(String reference,
org.sakaiproject.entity.api.Reference ref)
- Specified by:
parseEntityReference in interface org.sakaiproject.entity.api.EntityProducer
getEntityDescription
public String getEntityDescription(org.sakaiproject.entity.api.Reference ref)
- Specified by:
getEntityDescription in interface org.sakaiproject.entity.api.EntityProducer
getEntityResourceProperties
public org.sakaiproject.entity.api.ResourceProperties getEntityResourceProperties(org.sakaiproject.entity.api.Reference ref)
- Specified by:
getEntityResourceProperties in interface org.sakaiproject.entity.api.EntityProducer
getEntity
public org.sakaiproject.entity.api.Entity getEntity(org.sakaiproject.entity.api.Reference ref)
- Specified by:
getEntity in interface org.sakaiproject.entity.api.EntityProducer
getEntityUrl
public String getEntityUrl(org.sakaiproject.entity.api.Reference ref)
- Specified by:
getEntityUrl in interface org.sakaiproject.entity.api.EntityProducer
getEntityAuthzGroups
public Collection getEntityAuthzGroups(org.sakaiproject.entity.api.Reference ref,
String userId)
- Specified by:
getEntityAuthzGroups in interface org.sakaiproject.entity.api.EntityProducer
getHttpAccess
public org.sakaiproject.entity.api.HttpAccess getHttpAccess()
- Specified by:
getHttpAccess in interface org.sakaiproject.entity.api.EntityProducer
Copyright © 2003-2013 Sakai Project. All Rights Reserved.