Class ListDelegatedNewsResource
- java.lang.Object
-
- org.silverpeas.core.web.rs.RESTWebService
-
- org.silverpeas.components.delegatednews.web.ListDelegatedNewsResource
-
- 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
@WebService @Path("delegatednews/{instanceId}") @Authorized public class ListDelegatedNewsResource extends org.silverpeas.core.web.rs.RESTWebService
A REST Web resource representing a given delegated news. It is a web service that provides an access to a delegated news referenced by its URL.
-
-
Constructor Summary
Constructors Constructor Description ListDelegatedNewsResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getComponentId()
protected DelegatedNewsService
getDelegatedNewsService()
Gets a business service on delegatedNews.protected String
getResourceBasePath()
DelegatedNewsEntity[]
updateDelegatedNews(DelegatedNewsEntity[] newDelegatedNews)
Updates order or delete the delegatedNews from the JSON representation.-
Methods inherited from class org.silverpeas.core.web.rs.RESTWebService
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
-
-
-
-
Method Detail
-
getDelegatedNewsService
protected DelegatedNewsService getDelegatedNewsService()
Gets a business service on delegatedNews.- Returns:
- a delegatedNews service instance.
-
getResourceBasePath
protected String getResourceBasePath()
- Specified by:
getResourceBasePath
in classorg.silverpeas.core.web.rs.RESTWebService
-
getComponentId
public String getComponentId()
-
updateDelegatedNews
@PUT @Consumes("application/json") @Produces("application/json") public DelegatedNewsEntity[] updateDelegatedNews(DelegatedNewsEntity[] newDelegatedNews)
Updates order or delete the delegatedNews from the JSON representation. If the user isn't authenticated, a 401 HTTP code is returned. If the user isn't authorized to save the delegated news, a 403 is returned. If a problem occurs when processing the request, a 503 HTTP code is returned.- Parameters:
newDelegatedNews
- an array of delegated news to update order or to delete- Returns:
- the new list of delegated news after update or delete
-
-