Interface SilverpeasWebResource
-
- All Known Subinterfaces:
ProtectedWebResource
,ScimProtectedWebResource
,WbeProtectedWebResource
- All Known Implementing Classes:
AbstractAdminResource
,AbstractAttachmentResource
,AbstractCalendarResource
,AbstractContributionResource
,AbstractLoggingResource
,AbstractLookResource
,AbstractMessageResource
,AbstractNodeResource
,AbstractPasswordResource
,AbstractPublicationResource
,AbstractSimpleDocumentResource
,AbstractSubscriptionResource
,AbstractWbeFileResource
,AttachmentResource
,AuthenticationResource
,BundleResource
,CalendarResource
,CipherKeyResource
,CommentResource
,ComponentResource
,ComponentsResource
,ContributionContentResource
,DisplayResource
,DocumentViewResource
,EmbedMediaPlayerResource
,EmbedMediaViewerResource
,FileUploadResource
,FilteredPdcResource
,ICalendarResource
,InboxUserNotificationResource
,InvitationResource
,LanguageResource
,ListNodeResource
,LogResource
,MessageResource
,MyLinksResource
,MyPreferencesResource
,NodeResource
,PasswordResource
,PdcClassificationResource
,PdcPredefinedClassificationResource
,PdcResource
,PreviewResource
,PublicationResource
,RatingResource
,RelationResource
,ReminderResource
,ReplacementResource
,RESTWebService
,ScimV2BulkResource
,ScimV2GroupResource
,ScimV2ResourceTypeResource
,ScimV2SchemaResource
,ScimV2SearchResource
,ScimV2SelfResource
,ScimV2ServiceProviderConfigResource
,ScimV2UserResource
,SearchResource
,SelectionBasketResource
,SharedAttachmentResource
,SharedNodeResource
,SharedPublicationResource
,SharingResource
,SilverLoggerConfigurationResource
,SilverpeasUserSessionTokenResource
,SimpleDocumentListResource
,SimpleDocumentResource
,SimpleDocumentResourceCreator
,SpaceResource
,StreamingPlayerResource
,SubscribeResource
,SubscriptionResource
,ThesaurusResource
,ThumbnailResource
,TicketResource
,UnsubscribeResource
,UserCalendarResource
,UserGroupProfileResource
,UserICalendarResource
,UserProfileResource
,VariablesResource
,VolatileCacheResource
,WysiwygEditorConfigResource
public interface SilverpeasWebResource
The representation of a resource managed by Silverpeas in the Web. A resource accessible by the Web provides an access to the instances of the resource and defines a set of operations that be performed on those instances. A resource is always identified by an URI by which it can be accessed in the Web; all instances of such a resource are then identified from this URI that is used as the base one for the resource instances and operations.A Web resource represents an entity in Silverpeas that is accessible through the Web. This entity can a be contribution, a contribution's content, or a any business entities used in Silverpeas (like the user profiles for example).
Named as
Target
in the JAX-RS jargon, as being the endpoint of an URI-based HTTP communication, the Web resource acts in fact, for the Web clients, as a proxy of the entities it is intended to represent and, as such it is uniquely identified by a base URI at which the entities are meant to be exposed on the Web. As a proxy, it plays the role of a translator, as it translates the expected HTTP requests in business methods implying the entity(ies) targeted by the requested URI, and then it translates the answer of those methods in an HTTP response that is sent back to the requester; usually, the response carries a representation of the entity(ies) implying in the treatment according to the negotiated format (specified in MIME).So, an entity that is accessible on the Web is then structured in the following way:
- The entity itself defining the business operations through which the applications in Silverpeas manage it. This entity has no knowledge of the Web and of how to be interfaced with.
- The Web resource, proxying the entity for the Web and translating the HTTP-verbs in business operations implying the entity(ies) targeted by the exact requested URI.
- The entity Web state (aka entity state representation for the Web), ready to be encoded into the negotiated representation format (usually in JSON) and that represents the state of the entity at the time the HTTP request is answered.
- Author:
- Yohann Chastagnier, Miguel Moquillon
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static String
getAbsoluteBasePath()
Gets the absolute base path of all the web resources relative to the root path of the Silverpeas URL by taking into account the settings on the application URL.static String
getBasePath()
Gets the base path of all the web resources relative to the root path of the Silverpeas URL by taking into account the settings on the application URL.static javax.ws.rs.core.UriBuilder
getBasePathBuilder()
Gets the base path of all the web resources relative to the root path of the Silverpeas URL in the form of aUriBuilder
.static javax.ws.rs.core.UriBuilder
getBaseUriBuilder(javax.servlet.http.HttpServletRequest request)
Gets the base URI of all the web resources.String
getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to.javax.servlet.http.HttpServletRequest
getHttpRequest()
Gets the current HTTP request received by this Web resource.WebResourceUri
getUri()
Gets the URI targeted by the current HTTP request in the form of aWebResourceUri
.
-
-
-
Field Detail
-
BASE_PATH
static final String BASE_PATH
- See Also:
- Constant Field Values
-
-
Method Detail
-
getBasePath
static String getBasePath()
Gets the base path of all the web resources relative to the root path of the Silverpeas URL by taking into account the settings on the application URL. All the web resources are defined from this base URI.- Returns:
- the base path from which all the web resources are defined as a string.
-
getAbsoluteBasePath
static String getAbsoluteBasePath()
Gets the absolute base path of all the web resources relative to the root path of the Silverpeas URL by taking into account the settings on the application URL. All the web resources are defined from this absolute base URI.- Returns:
- the absolute base path from which all the web resources are defined as a string.
-
getBasePathBuilder
static javax.ws.rs.core.UriBuilder getBasePathBuilder()
Gets the base path of all the web resources relative to the root path of the Silverpeas URL in the form of aUriBuilder
. All the web resources are defined from this base URI.- Returns:
- the
UriBuilder
initialized with the base path from which all the web resources are defined.
-
getBaseUriBuilder
static javax.ws.rs.core.UriBuilder getBaseUriBuilder(javax.servlet.http.HttpServletRequest request)
Gets the base URI of all the web resources. All the web resources are defined from this base URI. The URI includes everything preceding the path (host, port, etc). The URI in its full form is dedicated to be used to expose the resource out of the Web context of Silverpeas.- Parameters:
request
- the HTTP servlet request that is received from the Web client and from which the base URI in its full form will be computed.- Returns:
- the full base URI as an
UriBuilder
.
-
getHttpRequest
javax.servlet.http.HttpServletRequest getHttpRequest()
Gets the current HTTP request received by this Web resource.- Returns:
- the current HTTP request.
-
getUri
WebResourceUri getUri()
Gets the URI targeted by the current HTTP request in the form of aWebResourceUri
.- Returns:
- the
WebResourceUri
initialized with the URI request.
-
getComponentId
String getComponentId()
Gets the identifier of the component instance to which the requested resource belongs to.- Returns:
- the identifier of the Silverpeas component instance.
-
-