| java.lang.Object org.sakaiproject.site.impl.BaseSiteService
All known Subclasses: org.sakaiproject.site.impl.DbSiteService,
BaseSiteService | abstract public class BaseSiteService implements SiteService,StorageUser(Code) | |
BaseSiteService is a base implementation of the SiteService.
|
Inner Class :protected interface Storage | |
Method Summary | |
protected void | addLiveProperties(BaseSite site) Create the live properties for the site. | protected void | addLiveUpdateProperties(BaseSite site) Update the live properties for a site for when modified. | public Site | addSite(String id, String type) | public Site | addSite(String id, Site other) | public void | addSiteAdvisor(SiteAdvisor siteAdvisor) | protected String | adjustSkin(String skin, boolean published) Adjust a skin value to be just a (folder) name, with no extension, and if missing, be null.
Parameters: skin - The skin value to adjust. | public boolean | allowAccessSite(String id) | public boolean | allowAddSite(String id) | public boolean | allowRemoveSite(String id) | public boolean | allowUnjoinSite(String id) | public boolean | allowUpdateGroupMembership(String id) | public boolean | allowUpdateSite(String id) | public boolean | allowUpdateSiteMembership(String id) | public boolean | allowViewRoster(String id) | public String | archive(String siteId, Document doc, Stack stack, String archivePath, List attachments) | abstract protected AuthzGroupService | authzGroupService() | protected String | convertReferenceUrl(String url) | public int | countSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria) | public void | destroy() Returns to uninitialized state. | protected void | disableAuthorizationGroup(String ref) Remove a site's realm. | protected void | disableAzg(Site site) Disable the site and site group azgs for a site that's being deleted. | protected void | disableRelated(Site site) Sync up with all other services for a site that is going away. | protected void | doSave(BaseSite site, boolean isNew) Comlete the save process. | protected void | enableAuthorizationGroup(String ref, String templateId, String userId, String fallbackTemplate) Setup the realm for an active site. | protected void | enableAzg(BaseSite site) Enable the site and site group AuthzGroups. | protected void | enableAzgSecurityAdvisor() Establish a security advisor to allow the "embedded" azg work to occur with no need for additional security permissions. | protected void | enableRelated(BaseSite site, boolean isNew) Sync up with all other services for a site that exists. | protected void | enforceGroupSubMembership(String siteId) Adjust any site groups for this site so that the group membership is a subset of the site's membership. | abstract protected EntityManager | entityManager() | abstract protected EventTrackingService | eventTrackingService() | public Group | findGroup(String refOrId) | public SitePage | findPage(String id) | public ToolConfiguration | findTool(String id) | abstract protected FunctionManager | functionManager() | 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. | public Time | getDate(Entity r) Access the resource date.
Parameters: r - The resource. | protected Site | getDefinedSite(String id) Access an already defined site object.
Parameters: id - The site id string. | public Entity | getEntity(Reference ref) | public Collection | getEntityAuthzGroups(Reference ref, String userId) | public String | getEntityDescription(Reference ref) | public ResourceProperties | getEntityResourceProperties(Reference ref) | public String | getEntityUrl(Reference ref) | public HttpAccess | getHttpAccess() | public String | getLabel() | public String[] | getLayoutNames() | public String | getOwnerId(Entity r) Access the resource owner user id.
Parameters: r - The resource. | public Site | getSite(String id) | public List<SiteAdvisor> | getSiteAdvisors() | public String | getSiteDisplay(String id) | public String | getSiteSkin(String id) | public String | getSiteSpecialId(String site) | public List | getSiteTypes() | public String | getSiteUserId(String site) | public Site | getSiteVisit(String id) | public List | getSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria, SortType sort, PagingPosition page) | public String | getSpecialSiteId(String special) | public String | getUserSiteId(String userId) | protected String | groupAzgTemplate(Site site) Figure the authorization group template for a group of this site, based on type and if it's a user site.
Parameters: site - The site to figure the authorization group templates for. | public void | init() Final initialization, once all dependencies are set. | public boolean | isDraft(Entity r) Check if this resource is in draft mode.
Parameters: r - The resource. | public boolean | isSpecialSite(String site) | public boolean | isUserSite(String site) | public void | join(String id) | abstract protected MemoryService | memoryService() | public String | merge(String siteId, Element root, String archivePath, String fromSiteId, Map attachmentNames, Map userIdTrans, Set userListAllowImport) | public String | merge(String siteId, Element el, String creatorId) | public Entity | newContainer(String ref) Construct a new continer given just an id.
Parameters: id - The id for the new object. | public Entity | newContainer(Element element) Construct a new container resource, from an XML element.
Parameters: element - The XML. | public Entity | newContainer(Entity other) Construct a new container resource, as a copy of another
Parameters: other - The other contianer to copy. | public Edit | newContainerEdit(String ref) Construct a new continer given just an id.
Parameters: id - The id for the new object. | public Edit | newContainerEdit(Element element) Construct a new container resource, from an XML element.
Parameters: element - The XML. | public Edit | newContainerEdit(Entity other) Construct a new container resource, as a copy of another
Parameters: other - The other contianer to copy. | public Entity | newResource(Entity container, String id, Object[] others) Construct a new rsource given just an id.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: id - The id for the new object. Parameters: others - (options) array of objects to load into the Resource's fields. | 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). Parameters: element - The XML. | 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). Parameters: other - The other resource. | public Edit | newResourceEdit(Entity container, String id, Object[] others) Construct a new rsource given just an id.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: id - The id for the new object. Parameters: others - (options) array of objects to load into the Resource's fields. | 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). Parameters: element - The XML. | 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). Parameters: other - The other resource. | abstract protected Storage | newStorage() Construct storage for this service. | public boolean | parseEntityReference(String reference, Reference ref) | protected void | regenerateAllSiteIds() Regenerate the page and tool ids for all sites. | public void | removeSite(Site site) | public boolean | removeSiteAdvisor(SiteAdvisor siteAdvisor) | public void | save(Site site) | protected void | saveGroupAzgs(Site site) Save group azgs that are modified. | public void | saveGroupMembership(Site site) | protected void | saveSiteAzg(Site site) Save the site's azg if modified. | public void | saveSiteInfo(String id, String description, String infoUrl) | public void | saveSiteMembership(Site site) | abstract protected SecurityService | securityService() | abstract protected ServerConfigurationService | serverConfigurationService() | abstract protected SessionManager | sessionManager() | public void | setCacheCleanerMinutes(String time) Set the # minutes between cache cleanings.
Parameters: time - The # minutes between cache cleanings. | public void | setCacheMinutes(String time) Set the # minutes to cache the site queries. | public void | setRegenerateIds(String value) Configuration: regenerate all site;'s page and tool ids to assure uniqueness. | public void | setSiteSecurity(String siteId, Set updateUsers, Set visitUnpUsers, Set visitUsers) | public void | setUserSecurity(String userId, Set updateSites, Set visitUnpSites, Set visitSites) | protected String | siteAzgTemplate(Site site) Figure the site's authorization group template, based on type and if it's a user site.
Parameters: site - The site to figure the realm for. | public boolean | siteExists(String id) | public String | siteGroupReference(String siteId, String groupId) | protected String | siteId(String ref) Access the site id extracted from a site reference.
Parameters: ref - The site reference string. | public String | sitePageReference(String siteId, String pageId) | public String | siteReference(String id) | public String | siteToolReference(String siteId, String toolId) | public Object[] | storageFields(Entity r) Collect the fields that need to be stored outside the XML (for the resource). | abstract protected ThreadLocalManager | threadLocalManager() | abstract protected TimeService | timeService() | public void | unjoin(String id) | protected void | unlock(String lock, String resource) Check security permission. | protected void | unlock2(String lock1, String lock2, String resource) Check security permission. | protected boolean | unlockCheck(String lock, String resource) Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | protected boolean | unlockCheck2(String lock1, String lock2, String resource) Check security permission.
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. | abstract protected UserDirectoryService | userDirectoryService() | public boolean | willArchiveMerge() |
m_cacheCleanerSeconds | protected int m_cacheCleanerSeconds(Code) | | The # seconds to cache gets. 0 disables the cache.
|
m_cacheSeconds | protected int m_cacheSeconds(Code) | | The # seconds to cache the site queries. 0 disables the cache.
|
m_regenerateIds | protected boolean m_regenerateIds(Code) | | If true, run the regenerate ids pass on all sites at startup.
|
m_relativeAccessPoint | protected String m_relativeAccessPoint(Code) | | The initial portion of a relative access point URL.
|
m_storage | protected Storage m_storage(Code) | | Storage manager for this service.
|
siteAdvisors | protected List<SiteAdvisor> siteAdvisors(Code) | | A list of observers watching site save events *
|
addLiveProperties | protected void addLiveProperties(BaseSite site)(Code) | | Create the live properties for the site.
|
addLiveUpdateProperties | protected void addLiveUpdateProperties(BaseSite site)(Code) | | Update the live properties for a site for when modified.
|
adjustSkin | protected String adjustSkin(String skin, boolean published)(Code) | | Adjust a skin value to be just a (folder) name, with no extension, and if missing, be null.
Parameters: skin - The skin value to adjust. A defaulted and adjusted skin value. |
allowAccessSite | public boolean allowAccessSite(String id)(Code) | | |
allowRemoveSite | public boolean allowRemoveSite(String id)(Code) | | |
allowUnjoinSite | public boolean allowUnjoinSite(String id)(Code) | | |
allowUpdateGroupMembership | public boolean allowUpdateGroupMembership(String id)(Code) | | |
allowUpdateSite | public boolean allowUpdateSite(String id)(Code) | | |
allowUpdateSiteMembership | public boolean allowUpdateSiteMembership(String id)(Code) | | |
allowViewRoster | public boolean allowViewRoster(String id)(Code) | | |
authzGroupService | abstract protected AuthzGroupService authzGroupService()(Code) | | the AuthzGroupService collaborator. |
convertReferenceUrl | protected String convertReferenceUrl(String url)(Code) | | Return the url unchanged, unless it's a reference, then return the reference url
|
countSites | public int countSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria)(Code) | | |
destroy | public void destroy()(Code) | | Returns to uninitialized state.
|
disableAuthorizationGroup | protected void disableAuthorizationGroup(String ref)(Code) | | Remove a site's realm.
Parameters: site - The site. |
disableAzg | protected void disableAzg(Site site)(Code) | | Disable the site and site group azgs for a site that's being deleted.
Parameters: site - The site. |
disableRelated | protected void disableRelated(Site site)(Code) | | Sync up with all other services for a site that is going away.
Parameters: site - The site. |
doSave | protected void doSave(BaseSite site, boolean isNew)(Code) | | Comlete the save process.
Parameters: site - The site to save. |
enableAuthorizationGroup | protected void enableAuthorizationGroup(String ref, String templateId, String userId, String fallbackTemplate)(Code) | | Setup the realm for an active site.
Parameters: ref - The reference for which the realm will be created (site, user). Parameters: templateId - The realm id of a template to use for the new realm. Parameters: userId - The user to get maintain in this realm. |
enableAzg | protected void enableAzg(BaseSite site)(Code) | | Enable the site and site group AuthzGroups.
Parameters: site - The site. |
enableAzgSecurityAdvisor | protected void enableAzgSecurityAdvisor()(Code) | | Establish a security advisor to allow the "embedded" azg work to occur with no need for additional security permissions.
|
enableRelated | protected void enableRelated(BaseSite site, boolean isNew)(Code) | | Sync up with all other services for a site that exists.
Parameters: site - The site. |
enforceGroupSubMembership | protected void enforceGroupSubMembership(String siteId)(Code) | | Adjust any site groups for this site so that the group membership is a subset of the site's membership.
Parameters: siteId - The site to adjust. |
entityManager | abstract protected EntityManager entityManager()(Code) | | the EntityManager collaborator. |
functionManager | abstract protected FunctionManager functionManager()(Code) | | the FunctionManager collaborator. |
getAccessPoint | protected String getAccessPoint(boolean relative)(Code) | | 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) the partial URL that forms the root of resource URLs. |
getDate | public Time getDate(Entity r)(Code) | | Access the resource date.
Parameters: r - The resource. The resource date. |
getDefinedSite | protected Site getDefinedSite(String id) throws IdUnusedException(Code) | | Access an already defined site object.
Parameters: id - The site id string. A site object containing the site information exception: IdUnusedException - if not found |
getOwnerId | public String getOwnerId(Entity r)(Code) | | Access the resource owner user id.
Parameters: r - The resource. The resource owner user id. |
groupAzgTemplate | protected String groupAzgTemplate(Site site)(Code) | | Figure the authorization group template for a group of this site, based on type and if it's a user site.
Parameters: site - The site to figure the authorization group templates for. the authorization group template for a group of this site, based on type and if it's a user site. |
init | public void init()(Code) | | Final initialization, once all dependencies are set.
|
isDraft | public boolean isDraft(Entity r)(Code) | | Check if this resource is in draft mode.
Parameters: r - The resource. true if the resource is in draft mode, false if not. |
isSpecialSite | public boolean isSpecialSite(String site)(Code) | | |
memoryService | abstract protected MemoryService memoryService()(Code) | | the MemoryService collaborator. |
newContainer | public Entity newContainer(String ref)(Code) | | Construct a new continer given just an id.
Parameters: id - The id for the new object. The new containe Resource. |
newContainer | public Entity newContainer(Element element)(Code) | | Construct a new container resource, from an XML element.
Parameters: element - The XML. The new container resource. |
newContainer | public Entity newContainer(Entity other)(Code) | | Construct a new container resource, as a copy of another
Parameters: other - The other contianer to copy. The new container resource. |
newContainerEdit | public Edit newContainerEdit(String ref)(Code) | | Construct a new continer given just an id.
Parameters: id - The id for the new object. The new containe Resource. |
newContainerEdit | public Edit newContainerEdit(Element element)(Code) | | Construct a new container resource, from an XML element.
Parameters: element - The XML. The new container resource. |
newContainerEdit | public Edit newContainerEdit(Entity other)(Code) | | Construct a new container resource, as a copy of another
Parameters: other - The other contianer to copy. The new container resource. |
newResource | public Entity newResource(Entity container, String id, Object[] others)(Code) | | Construct a new rsource given just an id.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: id - The id for the new object. Parameters: others - (options) array of objects to load into the Resource's fields. The new resource. |
newResource | public Entity newResource(Entity container, Element element)(Code) | | Construct a new resource, from an XML element.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: element - The XML. The new resource from the XML. |
newResource | public Entity newResource(Entity container, Entity other)(Code) | | 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). Parameters: other - The other resource. The new resource as a copy of the other. |
newResourceEdit | public Edit newResourceEdit(Entity container, String id, Object[] others)(Code) | | Construct a new rsource given just an id.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: id - The id for the new object. Parameters: others - (options) array of objects to load into the Resource's fields. The new resource. |
newResourceEdit | public Edit newResourceEdit(Entity container, Element element)(Code) | | Construct a new resource, from an XML element.
Parameters: container - The Resource that is the container for the new resource (may be null). Parameters: element - The XML. The new resource from the XML. |
newResourceEdit | public Edit newResourceEdit(Entity container, Entity other)(Code) | | 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). Parameters: other - The other resource. The new resource as a copy of the other. |
newStorage | abstract protected Storage newStorage()(Code) | | Construct storage for this service.
|
regenerateAllSiteIds | protected void regenerateAllSiteIds()(Code) | | Regenerate the page and tool ids for all sites.
|
saveGroupAzgs | protected void saveGroupAzgs(Site site)(Code) | | Save group azgs that are modified.
Parameters: site - The site to save. |
saveSiteAzg | protected void saveSiteAzg(Site site)(Code) | | Save the site's azg if modified.
Parameters: site - The site to save. |
securityService | abstract protected SecurityService securityService()(Code) | | the SecurityService collaborator. |
sessionManager | abstract protected SessionManager sessionManager()(Code) | | the SessionManager collaborator. |
setCacheCleanerMinutes | public void setCacheCleanerMinutes(String time)(Code) | | Set the # minutes between cache cleanings.
Parameters: time - The # minutes between cache cleanings. (as an integer string). |
setCacheMinutes | public void setCacheMinutes(String time)(Code) | | Set the # minutes to cache the site queries.
Parameters: time - The # minutes to cache the site queries (as an integer string). |
setRegenerateIds | public void setRegenerateIds(String value)(Code) | | Configuration: regenerate all site;'s page and tool ids to assure uniqueness.
Parameters: value - The regenerate ids value |
setSiteSecurity | public void setSiteSecurity(String siteId, Set updateUsers, Set visitUnpUsers, Set visitUsers)(Code) | | |
setUserSecurity | public void setUserSecurity(String userId, Set updateSites, Set visitUnpSites, Set visitSites)(Code) | | |
siteAzgTemplate | protected String siteAzgTemplate(Site site)(Code) | | Figure the site's authorization group template, based on type and if it's a user site.
Parameters: site - The site to figure the realm for. the site's authorization group template, based on type and if it's a user site. |
siteId | protected String siteId(String ref)(Code) | | Access the site id extracted from a site reference.
Parameters: ref - The site reference string. The the site id extracted from a site reference. |
storageFields | public Object[] storageFields(Entity r)(Code) | | Collect the fields that need to be stored outside the XML (for the resource).
An array of field values to store in the record outside the XML (for the resource). |
timeService | abstract protected TimeService timeService()(Code) | | the TimeService collaborator. |
unlock | protected void unlock(String lock, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access |
unlock2 | protected void unlock2(String lock1, String lock2, String resource) throws PermissionException(Code) | | Check security permission.
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. exception: PermissionException - Thrown if the user does not have access to either. |
unlockCheck | protected boolean unlockCheck(String lock, String resource)(Code) | | Check security permission.
Parameters: lock - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if allowd, false if not |
unlockCheck2 | protected boolean unlockCheck2(String lock1, String lock2, String resource)(Code) | | Check security permission.
Parameters: lock1 - The lock id string. Parameters: lock2 - The lock id string. Parameters: resource - The resource reference string, or null if no resource is involved. true if either allowed, false if not |
willArchiveMerge | public boolean willArchiveMerge()(Code) | | |
|
|