|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.silverpeas.web.RESTWebService
com.silverpeas.subscribe.web.SubscriptionResource
@Service @RequestScoped @Authorized public class SubscriptionResource
A REST Web resource representing a given subscription. It is a web service that provides an access to a subscription referenced by its URL.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.silverpeas.web.RESTWebService |
---|
RESTWebService.WebProcess<RETURN_VALUE>, RESTWebService.WebTreatment<RETURN_VALUE> |
Field Summary |
---|
Fields inherited from class com.silverpeas.web.RESTWebService |
---|
RESPONSE_HEADER_ARRAYSIZE, REST_WEB_SERVICES_URI_BASE |
Constructor Summary | |
---|---|
SubscriptionResource()
|
Method Summary | |
---|---|
protected Collection<SubscriberEntity> |
asSubscriberWebEntities(Collection<SubscriptionSubscriber> subscribers)
Gets WEB entity collection representing the given subscriber collection. |
protected SubscriberEntity |
asSubscriberWebEntity(SubscriptionSubscriber subscriber)
Gets the WEB entity representing the given subscriber. |
protected Collection<SubscriptionEntity> |
asWebEntities(Collection<Subscription> subscriptions)
Gets WEB entity collection representing the given subscription collection. |
protected SubscriptionEntity |
asWebEntity(Subscription subscription)
Gets the WEB entity representing the given subscription. |
String |
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to. |
Collection<SubscriberEntity> |
getComponentSubscribers()
Gets the JSON representation of component subscription subscribers. |
javax.ws.rs.core.Response |
getComponentSubscribersWithInheritance(String subscriptionType,
boolean existenceIndicatorOnly)
Gets the JSON representation of resource subscription subscribers with inheritance. |
Collection<SubscriptionEntity> |
getComponentSubscriptions()
Gets the JSON representation of component subscriptions in relation with the user. |
Collection<SubscriberEntity> |
getSubscribers(String resourceId)
Gets the JSON representation of component/node subscription subscribers. |
javax.ws.rs.core.Response |
getSubscribersWithInheritance(String subscriptionType,
String resourceId,
boolean existenceIndicatorOnly)
Gets the JSON representation of resource subscription subscribers with inheritance. |
Collection<SubscriptionEntity> |
getSubscriptions(String resourceId)
Gets the JSON representation of component/node subscriptions of a resource. |
Methods inherited from class com.silverpeas.web.RESTWebService |
---|
getBundle, getBundleLocation, getGreaterUserRole, getHttpRequest, getHttpServletRequest, getHttpServletResponse, getOrganisationController, getUriInfo, getUserDetail, getUserPreferences, getUserRoles, process, validateUserAuthentication, validateUserAuthorization |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SubscriptionResource()
Method Detail |
---|
public Collection<SubscriptionEntity> getComponentSubscriptions()
public Collection<SubscriptionEntity> getSubscriptions(String resourceId)
resourceId
- identifier of the aimed resource (NODE for now). When a new type of resource
will be managed, the resource type will have to be passed into URI
public Collection<SubscriberEntity> getComponentSubscribers()
public Collection<SubscriberEntity> getSubscribers(String resourceId)
resourceId
- identifier of the aimed resource (NODE for now). When a new type of resource
will be managed, the resource type will have to be passed into URI
public javax.ws.rs.core.Response getComponentSubscribersWithInheritance(String subscriptionType, boolean existenceIndicatorOnly)
subscriptionType
- the type of subscription.existenceIndicatorOnly
- indicates if the return must only be true (if it exists at
least one subscriber) or false (no subscribers).
public javax.ws.rs.core.Response getSubscribersWithInheritance(String subscriptionType, String resourceId, boolean existenceIndicatorOnly)
subscriptionType
- the type of subscription.resourceId
- identifier of the aimed resource (NODE for now). When a new type of resource
will be managed, the resource type will have to be passed into URIexistenceIndicatorOnly
- indicates if the return must only be true (if it exists at
least one subscriber) or false (no subscribers).
protected Collection<SubscriptionEntity> asWebEntities(Collection<Subscription> subscriptions)
subscriptions
-
protected SubscriptionEntity asWebEntity(Subscription subscription)
subscription
-
protected Collection<SubscriberEntity> asSubscriberWebEntities(Collection<SubscriptionSubscriber> subscribers)
subscribers
-
protected SubscriberEntity asSubscriberWebEntity(SubscriptionSubscriber subscriber)
subscriber
-
public String getComponentId()
RESTWebService
getComponentId
in class RESTWebService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |