Package com.logicaldoc.web.service
Class TemplateServiceImpl
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
com.google.gwt.user.server.rpc.RemoteServiceServlet
com.logicaldoc.web.service.AbstractRemoteService
com.logicaldoc.web.service.TemplateServiceImpl
- All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService
,com.google.gwt.user.server.rpc.SerializationPolicyProvider
,TemplateService
,Serializable
,javax.servlet.Servlet
,javax.servlet.ServletConfig
Implementation of the TemplateService
- Since:
- 6.0
- Author:
- Matteo Caruso - LogicalDOC
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.logicaldoc.gui.frontend.client.services.TemplateService
TemplateService.Instance
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMakes a clone of an existing templatelong
countDocuments
(long templateId) Counts the documents of a given templatevoid
delete
(long templateId) Deletes a given templategetAttributes
(long templateId, GUIExtensibleObject extensibleObject) Retrieves all attributes of the specified templategetTemplate
(long templateId) Loads a given template from the databasesave
(GUITemplate guiTemplate) Creates or updates a templateMethods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
getSerializationPolicy, init, processCall, processCall, processPost
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost
Methods inherited from class javax.servlet.http.HttpServlet
service
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Constructor Details
-
TemplateServiceImpl
public TemplateServiceImpl()
-
-
Method Details
-
delete
Description copied from interface:TemplateService
Deletes a given template- Specified by:
delete
in interfaceTemplateService
- Parameters:
templateId
- identifier of the template- Throws:
ServerException
- an error happened in the server application
-
countDocuments
Description copied from interface:TemplateService
Counts the documents of a given template- Specified by:
countDocuments
in interfaceTemplateService
- Parameters:
templateId
- identifier of the template- Returns:
- number of documents referencing the template
- Throws:
ServerException
- an error happened in the server application
-
save
Description copied from interface:TemplateService
Creates or updates a template- Specified by:
save
in interfaceTemplateService
- Parameters:
guiTemplate
- the template to save- Returns:
- the saved template
- Throws:
ServerException
- an error happened in the server application
-
clone
Description copied from interface:TemplateService
Makes a clone of an existing template- Specified by:
clone
in interfaceTemplateService
- Parameters:
templateId
- identifier of the original templatecloneName
- name of the cloned template- Returns:
- the created clone
- Throws:
ServerException
- an error happened in the server application
-
getTemplate
Description copied from interface:TemplateService
Loads a given template from the database- Specified by:
getTemplate
in interfaceTemplateService
- Parameters:
templateId
- identifier of the template- Returns:
- the template retrieved by the server application
- Throws:
ServerException
- an error happened in the server application
-
getAttributes
public List<GUIAttribute> getAttributes(long templateId, GUIExtensibleObject extensibleObject) throws ServerException Description copied from interface:TemplateService
Retrieves all attributes of the specified template- Specified by:
getAttributes
in interfaceTemplateService
- Parameters:
templateId
- identifier of the templateextensibleObject
- this is optional and is the object for which the attributes must be retrieved- Returns:
- the attributes
- Throws:
ServerException
- an error happened in the server application
-