Package org.ametys.web.service
Interface Service
-
- All Superinterfaces:
Labelable
,Model
,ModelItemAccessor
,ModelItemContainer
- All Known Implementing Classes:
AttachmentsService
,ExplorerFolderService
,FilteredContentsService
,FilteredPagesService
,LinkDirectoryService
,SearchPagesService
,SearchService
,ServerDirectoryService
,SitemapService
,StaticService
,SyndicationService
public interface Service extends Model, Labelable
Interface representing a business service.
A service is identified by a name and a Cocoon-URL.
This URL correspond to a pipeline called by a page template.
URL must be relative to the sitemap of the service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description I18nizableText
getCategory()
Retrieves the category of the service.Integer
getCreationBoxHeight()
Gets the height of the creation dialog box.Integer
getCreationBoxWidth()
Gets the width of the creation dialog box.List<ClientSideElement.ScriptFile>
getCSSFiles()
Returns the list of CSS files needed to correctly display the service's in BO, such as the service's icondefault String
getFamilyId()
Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family IdString
getIconDecorator()
Retrieves the CSS class to use for decorator above the main iconString
getIconGlyph()
Retrieves the CSS class to use for glyph iconString
getLargeIcon()
Retrieves the URL of the icon without the context path.String
getMediumIcon()
Retrieves the URL of the icon without the context path.Map<String,ModelItem>
getParameters()
Retrieves the service's parameters definitionsClientSideElement.Script
getParametersScript()
This method return the script that will be used to display parameters field.String
getPluginName()
Returns the plugin's name.String
getRight()
Get the right needed to create an instance of this service.String
getSmallIcon()
Retrieves the URL of the icon without the context path.String
getURL()
Returns the service's Cocoon-URL.View
getView()
Retrieves the service's viewvoid
index(ZoneItem zoneItem, org.apache.solr.common.SolrInputDocument document)
Fill the index with service data.
This method is called during the containing page indexation process.boolean
isCacheable(Page currentPage, ZoneItem zoneItem)
Returns true if the result of this service may be cached, depending on theZoneItem
containing an instance of this service.boolean
isPrivate()
Get whether the service is private, i.e.-
Methods inherited from interface org.ametys.runtime.util.Labelable
getDescription, getLabel, getName
-
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, getModelItems, hasModelItem
-
-
-
-
Method Detail
-
getPluginName
String getPluginName()
Returns the plugin's name.- Returns:
- the plugin's name.
-
getCategory
I18nizableText getCategory()
Retrieves the category of the service.- Returns:
- the category.
-
getIconGlyph
String getIconGlyph()
Retrieves the CSS class to use for glyph icon- Returns:
- the glyph name.
-
getIconDecorator
String getIconDecorator()
Retrieves the CSS class to use for decorator above the main icon- Returns:
- the glyph name.
-
getSmallIcon
String getSmallIcon()
Retrieves the URL of the icon without the context path.- Returns:
- the icon URL for the small image 16x16.
-
getMediumIcon
String getMediumIcon()
Retrieves the URL of the icon without the context path.- Returns:
- the icon URL for the medium image 32x32.
-
getLargeIcon
String getLargeIcon()
Retrieves the URL of the icon without the context path.- Returns:
- the icon URL for the large image 48x48.
-
getCreationBoxHeight
Integer getCreationBoxHeight()
Gets the height of the creation dialog box.- Returns:
- the height of the creation dialog box
-
getCreationBoxWidth
Integer getCreationBoxWidth()
Gets the width of the creation dialog box.- Returns:
- the width of the creation dialog box
-
getCSSFiles
List<ClientSideElement.ScriptFile> getCSSFiles()
Returns the list of CSS files needed to correctly display the service's in BO, such as the service's icon- Returns:
- The list of CSS files needed. Must not be null.
-
getParameters
Map<String,ModelItem> getParameters()
Retrieves the service's parameters definitions- Returns:
- the service's parameters definitions
-
getParametersScript
ClientSideElement.Script getParametersScript()
This method return the script that will be used to display parameters field.- Returns:
- The script. Can be null.
-
isPrivate
boolean isPrivate()
Get whether the service is private, i.e. should not be created by the regular service interface.- Returns:
- true if the service is private, false if it is public.
-
getRight
String getRight()
Get the right needed to create an instance of this service.- Returns:
- the right needed to create an instance of this service. If null is returned, no right is needed.
-
isCacheable
boolean isCacheable(Page currentPage, ZoneItem zoneItem)
Returns true if the result of this service may be cached, depending on theZoneItem
containing an instance of this service.
-
index
void index(ZoneItem zoneItem, org.apache.solr.common.SolrInputDocument document)
Fill the index with service data.
This method is called during the containing page indexation process.
-
getFamilyId
default String getFamilyId()
Description copied from interface:Model
Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family Id- Specified by:
getFamilyId
in interfaceModel
- Returns:
- content point (for example "org.ametys.cms.contenttype.ContentTypeExtensionPoint" for a content)
-
-