| org.sakaiproject.site.api.SiteService
All known Subclasses: org.sakaiproject.site.impl.BaseSiteService,
Inner Class :public class SelectionType | |
Inner Class :public class SortType | |
Method Summary | |
Site | addSite(String id, String type) Add a new site. | Site | addSite(String id, Site other) Add a new site. | public void | addSiteAdvisor(SiteAdvisor advisor) Registers a SiteAdvisor with the SiteService. | boolean | allowAccessSite(String id) check permissions for accessing (i.e. | boolean | allowAddSite(String id) check permissions for addSite().
Parameters: id - The site id. | boolean | allowRemoveSite(String id) check permissions for removeSite().
Parameters: id - The site id. | boolean | allowUnjoinSite(String id) check permissions for unjoin() - unjoining the site and removing all role relationships.
Parameters: id - The site id. | boolean | allowUpdateGroupMembership(String id) check permissions for updating a site's groups' memberships
Parameters: id - The site id. | boolean | allowUpdateSite(String id) check permissions for updating a site
Parameters: id - The site id. | boolean | allowUpdateSiteMembership(String id) check permissions for updating a site's membership
Parameters: id - The site id. | boolean | allowViewRoster(String id) check permissions for viewing project site participants
Parameters: id - The site id. | int | countSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria) Count the Site objets that meet specified criteria.
Parameters: type - The SelectionType specifying what sort of selection is intended. Parameters: ofType - Site type criteria: null for any type; a String to match a single type; A String[], List or Set to match any type in the collection. Parameters: criteria - Additional selection criteria: sits returned will match this string somewhere in their id, title, description, or skin. Parameters: propertyCriteria - Additional selection criteria: sites returned will have a property named to match each key in the map, whose values match (somewhere in their value) the value in the map (may be null or empty). | Group | findGroup(String refOrId) Access a Group object, given a reference string or id.
Parameters: refOrId - The group reference or id string. | SitePage | findPage(String id) Access the Page that has this id, if one is defined, else return null. | ToolConfiguration | findTool(String id) Access the ToolConfiguration that has this id, if one is defined, else return null. | String[] | getLayoutNames() Get an array of names to match the site page layout options. | Site | getSite(String id) Access a site object.
Parameters: id - The site id string. | public List<SiteAdvisor> | getSiteAdvisors() Lists the current SiteAdvisors registered with the SiteService. | String | getSiteDisplay(String id) Form a display of the site title and id for this site.
Parameters: id - The site id. | String | getSiteSkin(String id) Compute the skin to use for the (optional) site specified in the id parameter. | String | getSiteSpecialId(String site) Extract the special id for this special site from the site id or reference.
Parameters: site - The site id or reference. | List | getSiteTypes() Access a unique list of String site types for any site type defined for any site, sorted by type. | String | getSiteUserId(String site) Extract the user id for this user site from the site id or reference.
Parameters: site - The site id or reference. | Site | getSiteVisit(String id) Access a site object for purposes of having the user visit the site - visitation permissions are in effect.
Parameters: id - The site id string. | List | getSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria, SortType sort, PagingPosition page) Access a list of Site objets that meet specified criteria.
Parameters: type - The SelectionType specifying what sort of selection is intended. Parameters: ofType - Site type criteria: null for any type; a String to match a single type; A String[], List or Set to match any type in the collection. Parameters: criteria - Additional selection criteria: sites returned will match this string somewhere in their id, title, description, or skin. Parameters: propertyCriteria - Additional selection criteria: sites returned will have a property named to match each key in the map, whose values match (somewhere in their value) the value in the map (may be null or empty). Parameters: sort - A SortType indicating the desired sort. | String | getSpecialSiteId(String special) Form the site id for this special site.
Parameters: special - The special id. | String | getUserSiteId(String userId) Form the site id for this user's site.
Parameters: userId - The user id. | boolean | isSpecialSite(String site) Is this site (id or reference) a special site?
Parameters: site - The site id or reference. | boolean | isUserSite(String site) Is this site (id or reference) a user site?
Parameters: site - The site id or reference. | void | join(String id) Cause the current user to join the site as defined by the site's joinable flag and joiner role. | String | merge(String toSiteId, Element e, String creatorId) Merge the site information from the archive into the given site.
Parameters: toSiteId - The target site id. Parameters: fromSite - The source site id Parameters: e - The XML DOM tree of content to merge. Parameters: creatorId - The site creator id for target site. | void | removeSite(Site site) Remove this site's information. | public boolean | removeSiteAdvisor(SiteAdvisor advisor) Removes a SiteAdvisor. | void | save(Site site) Save any updates to this site - it must be a defined site (the id must exist) and the user must have update permissions. | void | saveGroupMembership(Site site) Save only site group membership updates to this site - it must be a defined site (the id must exist) and the user must have site group membership update permissions. | void | saveSiteInfo(String id, String description, String infoUrl) | void | saveSiteMembership(Site site) Save only site membership updates to this site - it must be a defined site (the id must exist) and the user must have site membership update permissions. | void | setSiteSecurity(String siteId, Set updateUsers, Set visitUnpUsers, Set visitUsers) Establish the internal security for this site. | void | setUserSecurity(String userId, Set updateSites, Set visitUnpSites, Set visitSites) Establish the internal security for user for all sites. | boolean | siteExists(String id) Is this a valid site id?
Parameters: id - The site id string. | String | siteGroupReference(String siteId, String groupId) Access the internal reference which can be used to access the site group from within the system.
Parameters: siteId - The site id. Parameters: groupId - The group id. | String | sitePageReference(String siteId, String pageId) Access the internal reference which can be used to access the site page from within the system.
Parameters: siteId - The site id. Parameters: pageId - The page id. | String | siteReference(String id) Access the internal reference which can be used to access the site from within the system.
Parameters: id - The site id. | String | siteToolReference(String siteId, String toolId) Access the internal reference which can be used to access the site tool from within the system.
Parameters: siteId - The site id. Parameters: toolId - The tool id. | void | unjoin(String id) Cause the current user to unjoin the site, removing all role relationships. |
APPLICATION_ID | final static String APPLICATION_ID(Code) | | The type string for this application: should not change over time as it may be stored in various parts of persistent entities.
|
GROUP_SUBTYPE | final static String GROUP_SUBTYPE(Code) | | The Entity Reference sub-type for Group references.
|
MAIN_CONTAINER | final static String MAIN_CONTAINER(Code) | | The name of the main container for a resource in a site (channel, calendar, etc.).
|
PAGE_SUBTYPE | final static String PAGE_SUBTYPE(Code) | | The Entity Reference sub-type for Page references.
|
REFERENCE_ROOT | final static String REFERENCE_ROOT(Code) | | This string starts the references to resources in this service.
|
SECURE_ADD_SITE | final static String SECURE_ADD_SITE(Code) | | Name for the event of adding a site.
|
SECURE_ADD_USER_SITE | final static String SECURE_ADD_USER_SITE(Code) | | Name for the event of adding a user's My Workspace site.
|
SECURE_REMOVE_SITE | final static String SECURE_REMOVE_SITE(Code) | | Name for the event of removing a site.
|
SECURE_UPDATE_GROUP_MEMBERSHIP | final static String SECURE_UPDATE_GROUP_MEMBERSHIP(Code) | | Name for the event of updating a site's groups' memberships.
|
SECURE_UPDATE_SITE | final static String SECURE_UPDATE_SITE(Code) | | Name for the event of updating a site.
|
SECURE_UPDATE_SITE_MEMBERSHIP | final static String SECURE_UPDATE_SITE_MEMBERSHIP(Code) | | Name for the event of updating a site's membership.
|
SECURE_VIEW_ROSTER | final static String SECURE_VIEW_ROSTER(Code) | | Name for the event of viewing project site participants.
|
SITE_ERROR | final static String SITE_ERROR(Code) | | The name of a special site that is used if the requested site is not available.
|
SITE_SUBTYPE | final static String SITE_SUBTYPE(Code) | | The Entity Reference sub-type for Site references.
|
SITE_TEMPLATE | final static String SITE_TEMPLATE(Code) | | The name of a special site that is a template for non-user sites.
|
SITE_VISIT | final static String SITE_VISIT(Code) | | Name for the event of visiting a site.
|
SITE_VISIT_UNPUBLISHED | final static String SITE_VISIT_UNPUBLISHED(Code) | | Name for the event of visiting an unpublished site.
|
TOOL_SUBTYPE | final static String TOOL_SUBTYPE(Code) | | The Entity Reference sub-type for Tool references.
|
URL_ERROR | final static String URL_ERROR(Code) | | The name of a special site that is used if the requested url is not understood.
|
USER_SITE_TEMPLATE | final static String USER_SITE_TEMPLATE(Code) | | The name of a special site that is a template for user sites.
|
addSiteAdvisor | public void addSiteAdvisor(SiteAdvisor advisor)(Code) | | Registers a SiteAdvisor with the SiteService. Each registered advisor will be
called immediately upon a call to save(Site).
Parameters: advisor - The SiteAdvisor to add |
allowAccessSite | boolean allowAccessSite(String id)(Code) | | check permissions for accessing (i.e. visiting) a site
Parameters: id - The site id. true if the site is allowed to access the site, false if not. |
allowAddSite | boolean allowAddSite(String id)(Code) | | check permissions for addSite().
Parameters: id - The site id. true if the site is allowed to addSite(id), false if not. |
allowRemoveSite | boolean allowRemoveSite(String id)(Code) | | check permissions for removeSite().
Parameters: id - The site id. true if the site is allowed to removeSite(id), false if not. |
allowUnjoinSite | boolean allowUnjoinSite(String id)(Code) | | check permissions for unjoin() - unjoining the site and removing all role relationships.
Parameters: id - The site id. true if the user is allowed to unjoin(id), false if not. |
allowUpdateGroupMembership | boolean allowUpdateGroupMembership(String id)(Code) | | check permissions for updating a site's groups' memberships
Parameters: id - The site id. true if the site is allowed to update the site's groups' memberships, false if not. |
allowUpdateSite | boolean allowUpdateSite(String id)(Code) | | check permissions for updating a site
Parameters: id - The site id. true if the site is allowed to update the site, false if not. |
allowUpdateSiteMembership | boolean allowUpdateSiteMembership(String id)(Code) | | check permissions for updating a site's membership
Parameters: id - The site id. true if the site is allowed to update the site's membership, false if not. |
allowViewRoster | boolean allowViewRoster(String id)(Code) | | check permissions for viewing project site participants
Parameters: id - The site id. true if the site is allowed to addSite(id), false if not. |
countSites | int countSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria)(Code) | | Count the Site objets that meet specified criteria.
Parameters: type - The SelectionType specifying what sort of selection is intended. Parameters: ofType - Site type criteria: null for any type; a String to match a single type; A String[], List or Set to match any type in the collection. Parameters: criteria - Additional selection criteria: sits returned will match this string somewhere in their id, title, description, or skin. Parameters: propertyCriteria - Additional selection criteria: sites returned will have a property named to match each key in the map, whose values match (somewhere in their value) the value in the map (may be null or empty). The count of Site objets that meet specified criteria. |
findGroup | Group findGroup(String refOrId)(Code) | | Access a Group object, given a reference string or id.
Parameters: refOrId - The group reference or id string. The Group object if found, or null if not. |
findPage | SitePage findPage(String id)(Code) | | Access the Page that has this id, if one is defined, else return null. The page may be on any Site.
Parameters: id - The id of the page. The SitePage that has this id, if one is defined, else return null. |
findTool | ToolConfiguration findTool(String id)(Code) | | Access the ToolConfiguration that has this id, if one is defined, else return null. The tool may be on any Site and on any SitePage.
Parameters: id - The id of the tool. The ToolConfiguration that has this id, if one is defined, else return null. |
getLayoutNames | String[] getLayoutNames()(Code) | | Get an array of names to match the site page layout options.
The array of human readable layout titles possible for any site page. |
getSiteAdvisors | public List<SiteAdvisor> getSiteAdvisors()(Code) | | Lists the current SiteAdvisors registered with the SiteService.
An unmodifiable List containing the currently registered SiteAdvisors |
getSiteDisplay | String getSiteDisplay(String id)(Code) | | Form a display of the site title and id for this site.
Parameters: id - The site id. A display of the site title and id for this site. |
getSiteSkin | String getSiteSkin(String id)(Code) | | Compute the skin to use for the (optional) site specified in the id parameter. If no site specified, or if the site has no skin defined, use the configured default skin.
Parameters: id - The (optional) site id. A skin to use for this site. |
getSiteSpecialId | String getSiteSpecialId(String site)(Code) | | Extract the special id for this special site from the site id or reference.
Parameters: site - The site id or reference. The special id associated with this site. |
getSiteTypes | List getSiteTypes()(Code) | | Access a unique list of String site types for any site type defined for any site, sorted by type.
A list (String) of all used site types. |
getSiteUserId | String getSiteUserId(String site)(Code) | | Extract the user id for this user site from the site id or reference.
Parameters: site - The site id or reference. The user id associated with this site. |
getSites | List getSites(SelectionType type, Object ofType, String criteria, Map propertyCriteria, SortType sort, PagingPosition page)(Code) | | Access a list of Site objets that meet specified criteria.
Parameters: type - The SelectionType specifying what sort of selection is intended. Parameters: ofType - Site type criteria: null for any type; a String to match a single type; A String[], List or Set to match any type in the collection. Parameters: criteria - Additional selection criteria: sites returned will match this string somewhere in their id, title, description, or skin. Parameters: propertyCriteria - Additional selection criteria: sites returned will have a property named to match each key in the map, whose values match (somewhere in their value) the value in the map (may be null or empty). Parameters: sort - A SortType indicating the desired sort. For no sort, set to SortType.NONE. Parameters: page - The PagePosition subset of items to return. The List (Site) of Site objets that meet specified criteria. |
getSpecialSiteId | String getSpecialSiteId(String special)(Code) | | Form the site id for this special site.
Parameters: special - The special id. The site id for this user's site. |
getUserSiteId | String getUserSiteId(String userId)(Code) | | Form the site id for this user's site.
Parameters: userId - The user id. The site id for this user's site. |
isSpecialSite | boolean isSpecialSite(String site)(Code) | | Is this site (id or reference) a special site?
Parameters: site - The site id or reference. true if this is a special site, false if not. |
isUserSite | boolean isUserSite(String site)(Code) | | Is this site (id or reference) a user site?
Parameters: site - The site id or reference. true if this is a user site, false if not. |
merge | String merge(String toSiteId, Element e, String creatorId)(Code) | | Merge the site information from the archive into the given site.
Parameters: toSiteId - The target site id. Parameters: fromSite - The source site id Parameters: e - The XML DOM tree of content to merge. Parameters: creatorId - The site creator id for target site. A log of status messages from the archive. |
removeSiteAdvisor | public boolean removeSiteAdvisor(SiteAdvisor advisor)(Code) | | Removes a SiteAdvisor.
Parameters: advisor - The SiteAdvisor to remove Whether the SiteAdvisor was previously registered and hence removed. |
saveGroupMembership | void saveGroupMembership(Site site) throws IdUnusedException, PermissionException(Code) | | Save only site group membership updates to this site - it must be a defined site (the id must exist) and the user must have site group membership update permissions.
Parameters: site - The site, modified, to save. throws: IdUnusedException - If the site's id is not a defined site id. throws: PermissionException - If the end user does not have permission to update the membership of the site. |
saveSiteInfo | void saveSiteInfo(String id, String description, String infoUrl) throws IdUnusedException, PermissionException(Code) | | Save a site's information display fields: description and info url
Parameters: id - The site id to update. Parameters: description - The updated description. Parameters: infoUrl - The updated infoUrl throws: IdUnusedException - If the site's id is not a defined site id. throws: PermissionException - If the end user does not have permission to update the site. |
saveSiteMembership | void saveSiteMembership(Site site) throws IdUnusedException, PermissionException(Code) | | Save only site membership updates to this site - it must be a defined site (the id must exist) and the user must have site membership update permissions.
Parameters: site - The site, modified, to save. throws: IdUnusedException - If the site's id is not a defined site id. throws: PermissionException - If the end user does not have permission to update the membership of the site. |
setSiteSecurity | void setSiteSecurity(String siteId, Set updateUsers, Set visitUnpUsers, Set visitUsers)(Code) | | Establish the internal security for this site. Previous security settings are replaced for this site. Assigning a user with update implies the two reads; assigning a user with unp read implies the other read.
Parameters: siteId - The id of the site. Parameters: updateUsers - The set of String User Ids who have update access. Parameters: visitUnpUsers - The set of String User Ids who have visit unpublished access. Parameters: visitUsers - The set of String User Ids who have visit access. |
setUserSecurity | void setUserSecurity(String userId, Set updateSites, Set visitUnpSites, Set visitSites)(Code) | | Establish the internal security for user for all sites. Previous security settings are replaced for this user. Assigning a user with update implies the two reads; assigning a user with unp read implies the other read.
Parameters: userId - The id of the user. Parameters: updateSites - The set of String site ids where the user has update access. Parameters: visitUnpSites - The set of String site ids where the user has visit unpublished access. Parameters: visitSites - The set of String site ids where the user has visit access. |
siteExists | boolean siteExists(String id)(Code) | | Is this a valid site id?
Parameters: id - The site id string. True if a site with this id is defined, false if not. |
siteGroupReference | String siteGroupReference(String siteId, String groupId)(Code) | | Access the internal reference which can be used to access the site group from within the system.
Parameters: siteId - The site id. Parameters: groupId - The group id. The the internal reference which can be used to access the site group from within the system. |
sitePageReference | String sitePageReference(String siteId, String pageId)(Code) | | Access the internal reference which can be used to access the site page from within the system.
Parameters: siteId - The site id. Parameters: pageId - The page id. The the internal reference which can be used to access the site page from within the system. |
siteReference | String siteReference(String id)(Code) | | Access the internal reference which can be used to access the site from within the system.
Parameters: id - The site id. The the internal reference which can be used to access the site from within the system. |
siteToolReference | String siteToolReference(String siteId, String toolId)(Code) | | Access the internal reference which can be used to access the site tool from within the system.
Parameters: siteId - The site id. Parameters: toolId - The tool id. The the internal reference which can be used to access the site tool from within the system. |
|
|