Kevin Roast e994c97f0b Merged V3.2E to HEAD
17495: Changed xforms-samples name to wcm-sample
   17496: Minor fixes for day and week views when rendering new events
   17497: *RECORD ONLY* Added Enterprise logo local copy.
   17498: ETHREEOH-2933 - User can see contents of the moderated site if user is not a member of the site
          - Site containers are now private and non member's can't see content.
          - fix only applies to new moderated sites.
   17499: ETHREEOH-2322 - Office Plugin: filename overlaps the plugin UI if longer than 40 characters without spaces
   17500: Temorary build fix for site visibility
   17508: ETHREEOH-1268 - Pages and Components show varying degrees of success handling "site not found" errors.
   17509: Fix for ETHREEOH1733 - Wrong display of multi day events in Share
   17514: View In Browser action for document list and document details actions.
   17515: Merged DEV-TEMPORARY to V3.2
      17471: ETHREEOH-3193: 'capitalize' in output path pattern works differently for templates (vs. XSDs)
   17516: Missing css file from Edit Offline changes. Also "Checked out on/by" text changed to "Editing started on/by". Tags now comma separated
   17517: Merged DEV-TEMPORARY to V3.2
      17474: ETHREEOH-1211: Can't See Images in TinyMCE
   17518: Office add-in: ETHREEOH-3361 - Workflow name is visible only before symbol &, ETHREEOH-2735 - Total number of founded items is not shown
   17519: 3.2E help links
   17520: 3.2E help links, plus ETHREEOH-1536 - Incorrect "insert into current document" function work for unsupported files in MS Office Addin
   17522: Fix for ETHREEOH-3257 - Event becomes All day again after editing it to not All day
   17526: Fix for unreported issue when rendering an edited event after the view is filtered via tag component causes an script error
   17528: Fixed ETHREEOH-3364 " Admin Console - Group Search needs to show searching message and disable further requests while search is running"
          - Disabling search button & message displaying "Searching..." after 2 seconds for long searches for the following components:
             * Admin Console: Users - search user, add group
             * Admin Console: Groups - search group, add group, add user
             * Site: Members: People - search members, add people
             * Site: Members: Groups - search membergroups, add group
             * Site: Members: Pending invites - search invites
             * Site: Doclib: Assign Workflow - add users
             * People Finder 
             * Site Finder
          - All component listed above uses max search result except the following where webscript services lacks support for it:
             * Admin Console: Users - add group
             * Admin Console: Groups - search group, add group
             * Site: Members: Pending invites - search invites
          - Bugfix: When minSearchTermLength is set to 0:
             * Group Admin Console: switched to browse view
             * User Admin Console: didnt do a search
          - Bugfix: For some components minSearchTermLength & maxSearchResults were brought in as strings causing the global search's max result to be 1001 instead of 101

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18126 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2010-01-19 11:50:05 +00:00

220 lines
8.3 KiB
Java

package org.alfresco.service.cmr.site;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
/**
* Site service fundamental API.
* <p>
* This service API is designed to support the public facing Site APIs
*
* @author Roy Wetherall
*/
public interface SiteService
{
/**
* Create a new site.
*
* @param sitePreset site preset name
* @param shortName site short name, must be unique
* @param title site title
* @param description site description
* @param isPublic whether the site is public or not (true = public, false = private)
* @return SiteInfo information about the created site
* @deprecated since version 3.2, replaced by {@link #createSite(String, String, String, String, SiteVisibility)}
*/
SiteInfo createSite(String sitePreset, String shortName, String title, String description, boolean isPublic);
/**
* Create a new site.
*
* @param sitePreset site preset name
* @param shortName site short name, must be unique
* @param title site title
* @param description site description
* @param visibility site visibility (public|moderated|private)
* @return SiteInfo information about the created site
*/
SiteInfo createSite(String sitePreset, String shortName, String title, String description, SiteVisibility visibility);
/**
* List the available sites. This list can optionally be filtered by site name and/or site preset.
*
* @param nameFilter name filter
* @param sitePresetFilter site preset filter
* @param size list maximum size or zero for all
* @return List<SiteInfo> list of site information
*/
List<SiteInfo> listSites(String nameFilter, String sitePresetFilter, int size);
/**
* List the available sites. This list can optionally be filtered by site name and/or site preset.
*
* @param nameFilter name filter
* @param sitePresetFilter site preset filter
* @return List<SiteInfo> list of site information
*/
List<SiteInfo> listSites(String nameFilter, String sitePresetFilter);
/**
* List all the sites that the specified user has a explicit membership to.
*
* @param userName user name
* @return List<SiteInfo> list of site information
*/
List<SiteInfo> listSites(String userName);
/**
* Gets site information based on the short name of a site.
* <p>
* Returns null if the site can not be found.
*
* @param shortName the site short name
* @return SiteInfo the site information
*/
SiteInfo getSite(String shortName);
/**
* Update the site information.
* <P>
* Note that the short name and site preset of a site can not be updated once the site has been created.
*
* @param siteInfo site information
*/
void updateSite(SiteInfo siteInfo);
/**
* Delete the site.
*
* @param shortName site short name
*/
void deleteSite(String shortName);
/**
* List the members of the site. This includes both users and groups.
* <p>
* Name and role filters are optional and if not specified all the members of the site are returned.
*
* @param shortName site short name
* @param nameFilter name filter
* @param roleFilter role filter
* @param size max results size crop if >0
* @return Map<String, String> the authority name and their role
*/
Map<String, String> listMembers(String shortName, String nameFilter, String roleFilter, int size);
/**
* List the members of the site. This includes both users and groups if collapseGroups is set to false, otherwise all
* groups that are members are collapsed into their component users and listed.
*
* @param shortName site short name
* @param nameFilter name filter
* @param roleFilter role filter
* @param size max results size crop if >0
* @param collapseGroups true if collapse member groups into user list, false otherwise
* @return Map<String, String> the authority name and their role
*/
Map<String, String> listMembers(String shortName, String nameFilter, String roleFilter, int size, boolean collapseGroups);
/**
* Gets the role of the specified user.
*
* @param shortName site short name
* @param authorityName full authority name (so if it's a group then its prefixed with 'GROUP_')
* @return String site role, null if none
*/
String getMembersRole(String shortName, String authorityName);
/**
* Indicates whether an authority is a member of a site or not
*
* @param shortName site short name
* @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_')
* @return boolean true if the authority is a member of the site, false otherwise
*/
boolean isMember(String shortName, String authorityName);
/**
* Sets the role of an authority within a site
*
* @param shortName site short name
* @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_')
* @param role site role
*/
void setMembership(String shortName, String authorityName, String role);
/**
* Clears an authorities role within a site
*
* @param shortName site short name
* @param authorityName authority name (so if it's a group then its prefixed with 'GROUP_')
*/
void removeMembership(String shortName, String authorityName);
/**
* Creates a container for a component is a site of the given container type (must be a sub-type of st:siteContainer)
* <p>
* If no container type is specified then a node of type st:siteContainer is created.
* <p>
* The map of container properties are set on the created container node. Null can be provided when no properties
* need to be set.
*
* @param shortName site short name
* @param componentId component id
* @param containerType container type to create (can be null)
* @param containerProperties container property values (can be null)
* @return noderef of container or null if a container can't be created.
*/
NodeRef createContainer(String shortName, String componentId, QName containerType, Map<QName, Serializable> containerProperties);
/**
* Gets the "container" folder for the specified
* component.
*
* @param shortName short name of site
* @param componentId component id
* @param folderType type of folder to create (if null, creates standard folder)
* @return noderef of container
*/
NodeRef getContainer(String shortName, String componentId);
/**
* Determines if a "container" folder for the specified component exists.
*
* @param shortName short name of site
* @param componentId component id
* @return true => "container" folder exists for component
*/
boolean hasContainer(String shortName, String componentId);
/**
* Gets a list of all the currently available roles that a user can perform on a site
*
* @return List<String> list of available roles
*/
List<String> getSiteRoles();
/**
* Gets the sites group. All members of the site are contained within this group.
*
* @param shortName site short name
* @return String group name
*/
String getSiteGroup(String shortName);
/**
* Gets the sites role group. All members assigned the given role will be memebers of
* the returned group.
*
* @param shortName site short name
* @param role membership role
* @return String group name
*/
String getSiteRoleGroup(String shortName, String role);
}