Class MailTemplateServiceImpl
- java.lang.Object
-
- org.apache.syncope.core.rest.cxf.service.AbstractService
-
- org.apache.syncope.core.rest.cxf.service.MailTemplateServiceImpl
-
- All Implemented Interfaces:
JAXRSService
,MailTemplateService
@Service public class MailTemplateServiceImpl extends AbstractService implements MailTemplateService
-
-
Field Summary
Fields Modifier and Type Field Description protected MailTemplateLogic
logic
-
Fields inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
LOG, messageContext, OPTIONS_ALLOW, searchContext, uriInfo
-
Fields inherited from interface org.apache.syncope.common.rest.api.service.JAXRSService
CRLF, DOUBLE_DASH, PARAM_ANYTYPE_KIND, PARAM_ANYTYPEKEY, PARAM_CONNID_PAGED_RESULTS_COOKIE, PARAM_DETAILS, PARAM_ENTITY_KEY, PARAM_FIQL, PARAM_KEYWORD, PARAM_MAX, PARAM_NOTIFICATION, PARAM_ORDERBY, PARAM_PAGE, PARAM_REALM, PARAM_RECURSIVE, PARAM_RESOURCE, PARAM_SIZE, PARAM_USER
-
-
Constructor Summary
Constructors Constructor Description MailTemplateServiceImpl(MailTemplateLogic logic)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
create(MailTemplateTO mailTemplateTO)
Creates a new mail template.void
delete(String key)
Deletes the mail template matching the given key.javax.ws.rs.core.Response
getFormat(String key, MailTemplateFormat format)
Gets the template for the given key and format, if available.List<MailTemplateTO>
list()
Returns a list of all mail templates.MailTemplateTO
read(String key)
Returns mail template with matching key.void
removeFormat(String key, MailTemplateFormat format)
Removes the template for the given key and format, if available.void
setFormat(String key, MailTemplateFormat format, InputStream templateIn)
Sets the template for the given key and format, if available.-
Methods inherited from class org.apache.syncope.core.rest.cxf.service.AbstractService
applyPreference, buildPagedResult, checkETag, createResponse, findActualKey, getOrderByClauses, getPreference, isNullPriorityAsync, modificationResponse
-
-
-
-
Field Detail
-
logic
protected final MailTemplateLogic logic
-
-
Constructor Detail
-
MailTemplateServiceImpl
public MailTemplateServiceImpl(MailTemplateLogic logic)
-
-
Method Detail
-
create
public javax.ws.rs.core.Response create(MailTemplateTO mailTemplateTO)
Description copied from interface:MailTemplateService
Creates a new mail template.- Specified by:
create
in interfaceMailTemplateService
- Parameters:
mailTemplateTO
- Creates a new mail template.- Returns:
- Response object featuring Location header of created mail template
-
read
public MailTemplateTO read(String key)
Description copied from interface:MailTemplateService
Returns mail template with matching key.- Specified by:
read
in interfaceMailTemplateService
- Parameters:
key
- key of mail template to be read- Returns:
- mail template with matching key
-
list
public List<MailTemplateTO> list()
Description copied from interface:MailTemplateService
Returns a list of all mail templates.- Specified by:
list
in interfaceMailTemplateService
- Returns:
- list of all mail templates.
-
delete
public void delete(String key)
Description copied from interface:MailTemplateService
Deletes the mail template matching the given key.- Specified by:
delete
in interfaceMailTemplateService
- Parameters:
key
- key for mail template to be deleted
-
getFormat
public javax.ws.rs.core.Response getFormat(String key, MailTemplateFormat format)
Description copied from interface:MailTemplateService
Gets the template for the given key and format, if available.- Specified by:
getFormat
in interfaceMailTemplateService
- Parameters:
key
- mail templateformat
- template format- Returns:
- mail template with matching key and format, if available
-
setFormat
public void setFormat(String key, MailTemplateFormat format, InputStream templateIn)
Description copied from interface:MailTemplateService
Sets the template for the given key and format, if available.- Specified by:
setFormat
in interfaceMailTemplateService
- Parameters:
key
- mail templateformat
- template formattemplateIn
- template to be set
-
removeFormat
public void removeFormat(String key, MailTemplateFormat format)
Description copied from interface:MailTemplateService
Removes the template for the given key and format, if available.- Specified by:
removeFormat
in interfaceMailTemplateService
- Parameters:
key
- mail templateformat
- template format
-
-