Package org.silverpeas.core.webapi.pdc
Class FilteredPdcResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.core.webapi.pdc.FilteredPdcResource
-
- All Implemented Interfaces:
ProtectedWebResource
,WebAuthenticationValidation
,WebAuthorizationValidation
,SilverpeasWebResource
@WebService @Path("pdc/filter") @Authenticated public class FilteredPdcResource extends RESTWebService
A REST Web resource that represents the classification plan (named PdC) filtered by some criteria. For a description of the PdC, see the documentation onPdcResource
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.silverpeas.core.web.rs.RESTWebService
RESTWebService.WebProcess<R>, RESTWebService.WebTreatment<R>
-
-
Field Summary
-
Fields inherited from class org.silverpeas.core.web.rs.RESTWebService
RESPONSE_HEADER_ARRAYSIZE
-
Fields inherited from interface org.silverpeas.core.web.SilverpeasWebResource
BASE_PATH
-
-
Constructor Summary
Constructors Constructor Description FilteredPdcResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to.PdcEntity
getPdcFilteredByClassifiedContents(String workspaceId, List<String> componentIds, boolean withSecondaryAxis, String axisValues)
Gets a PdC containing only the axis and the axis's value that were used in the classification of the contents in Silverpeas.protected String
getResourceBasePath()
Gets the base path of the web resource relative to the root path of all the web resources in Silverpeas as given bySilverpeasWebResource.getBasePath()
.-
Methods inherited from class org.silverpeas.core.web.rs.RESTWebService
createWebResourceUri, fromPage, getBundle, getBundleLocation, getHighestUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getSilverpeasContext, getUri, getUser, getUserPreferences, getUserRoles, identifiedBy, identifiedBy, initContext, initWebResourceUri, isUserDefined, process
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.silverpeas.core.web.rs.ProtectedWebResource
validateUserAuthorization
-
Methods inherited from interface org.silverpeas.core.web.rs.WebAuthenticationValidation
validateUserAuthentication
-
-
-
-
Method Detail
-
getResourceBasePath
protected String getResourceBasePath()
Description copied from class:RESTWebService
Gets the base path of the web resource relative to the root path of all the web resources in Silverpeas as given bySilverpeasWebResource.getBasePath()
.- Specified by:
getResourceBasePath
in classRESTWebService
- Returns:
- the relative path that identifies this REST web service among all other REST web services.
-
getPdcFilteredByClassifiedContents
@GET @Produces("application/json") @Path("used") public PdcEntity getPdcFilteredByClassifiedContents(@QueryParam("workspaceId") String workspaceId, @QueryParam("componentId") List<String> componentIds, @QueryParam("withSecondaryAxis") boolean withSecondaryAxis, @QueryParam("values") String axisValues)
Gets a PdC containing only the axis and the axis's value that were used in the classification of the contents in Silverpeas. The Pdc can be restricted by the workspace and by the component to which the classified contents belong. As the filtered PdC is for a search, only the component instances configured as searchable are taken into account. The PdC that is sent back contains only the axis and, with each of them, the values to which the contents in Silverpeas are classified. The classified contents to take into account can be restricted by the workspace or by the application to which they belong, and by a set of axis' values with which they have to be classified. The version of the returned PdC indicates, for each axis's value, the count of contents that are classified with this value. According to the query parameters, it can contain also the secondary axis of the PdC. The PdC is sent back in JSON. If the user isn't authenticated, a 401 HTTP code is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.- Parameters:
workspaceId
- optionally the unique identifier of the workspace in which the classified contents are published.componentIds
- optionally the unique identifier of the component to which the classified contents belong.withSecondaryAxis
- optionally a boolean flag indicating whether the secondary PdC axis should be taken into account.axisValues
- optionally a set of axis' values on which the contents to take into account have to be classified. A value is defined by the identifier of the axis it belongs to and by its path from the root value in this axis, the two fields separated by a ':' character.- Returns:
- a web entity representing the PdC filtered by the contents that are classified on it. The entity is serialized in JSON.
-
getComponentId
public String getComponentId()
Description copied from interface:SilverpeasWebResource
Gets the identifier of the component instance to which the requested resource belongs to.- Returns:
- the identifier of the Silverpeas component instance.
-
-