Class CommunityWebResource
java.lang.Object
org.silverpeas.core.web.rs.RESTWebService
org.silverpeas.components.community.web.CommunityWebResource
- All Implemented Interfaces:
org.silverpeas.core.web.rs.ProtectedWebResource,org.silverpeas.core.web.rs.WebAuthenticationValidation,org.silverpeas.core.web.rs.WebAuthorizationValidation,org.silverpeas.core.web.SilverpeasWebResource
- Direct Known Subclasses:
CommunityMembershipResource,CommunityOfUsersResource
@Authorized
public abstract class CommunityWebResource
extends org.silverpeas.core.web.rs.RESTWebService
Base class of all the resources in the community application exposed through the Web. It is
expected the web resource to be spawn for each incoming request; the life-cycle of each web
resource instance is within the one of the request.
- Author:
- mmoquillon
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final org.silverpeas.core.admin.PaginationPageprotected static final StringFields inherited from class org.silverpeas.core.web.rs.RESTWebService
RESPONSE_HEADER_ARRAYSIZEFields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGets the relative base path at which are all exposed the resources in the community application.protected Collection<org.silverpeas.core.admin.user.model.SilverpeasRole>Gets the roles the user requesting currently this web resource plays in the community of users.protected CommunityWebManagerGets the Web Manager to use to fulfill the incoming request.protected voidprotected <T> Tprocess(CommunityWebResource.WebFunction<T> function) Processes the specified web function behalf the community of users concerned by the incoming request.Methods inherited from class org.silverpeas.core.web.rs.RESTWebService
createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getLanguage, getOrganisationController, getSilverpeasContext, getUri, getUser, getUserPreferences, identifiedBy, identifiedBy, initContext, initWebResourceUri, isUserDefined, processMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorizationMethods inherited from interface org.silverpeas.core.web.SilverpeasWebResource
getComponentIdMethods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation
validateUserAuthentication
-
Field Details
-
RESOURCE_NAME
- See Also:
-
NO_PAGINATION
protected static final org.silverpeas.core.admin.PaginationPage NO_PAGINATION
-
-
Constructor Details
-
CommunityWebResource
public CommunityWebResource()
-
-
Method Details
-
initURIBuilder
@PostConstruct protected void initURIBuilder() -
getResourceBasePath
Gets the relative base path at which are all exposed the resources in the community application.- Specified by:
getResourceBasePathin classorg.silverpeas.core.web.rs.RESTWebService- Returns:
- the base path of the resource relative to the URI at which are all exposed the REST-based web services in Silverpeas.
-
getUserRoles
Gets the roles the user requesting currently this web resource plays in the community of users.- Overrides:
getUserRolesin classorg.silverpeas.core.web.rs.RESTWebService- Returns:
- a collection of roles the current user plays.
-
getWebManager
Gets the Web Manager to use to fulfill the incoming request. The web manager centralizes all the behavior provided in the website, both by the Web GUI and the REST web resources.- Returns:
- a community web manager.
-
process
Processes the specified web function behalf the community of users concerned by the incoming request.- Type Parameters:
T- the concrete type of the answer.- Parameters:
function- the web function to apply.- Returns:
- the answer of the web function.
-