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 MailTemplateLogiclogic-
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.Responsecreate(MailTemplateTO mailTemplateTO)Creates a new mail template.voiddelete(String key)Deletes the mail template matching the given key.javax.ws.rs.core.ResponsegetFormat(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.MailTemplateTOread(String key)Returns mail template with matching key.voidremoveFormat(String key, MailTemplateFormat format)Removes the template for the given key and format, if available.voidsetFormat(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:MailTemplateServiceCreates a new mail template.- Specified by:
createin 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:MailTemplateServiceReturns mail template with matching key.- Specified by:
readin 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:MailTemplateServiceReturns a list of all mail templates.- Specified by:
listin interfaceMailTemplateService- Returns:
- list of all mail templates.
-
delete
public void delete(String key)
Description copied from interface:MailTemplateServiceDeletes the mail template matching the given key.- Specified by:
deletein 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:MailTemplateServiceGets the template for the given key and format, if available.- Specified by:
getFormatin 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:MailTemplateServiceSets the template for the given key and format, if available.- Specified by:
setFormatin interfaceMailTemplateService- Parameters:
key- mail templateformat- template formattemplateIn- template to be set
-
removeFormat
public void removeFormat(String key, MailTemplateFormat format)
Description copied from interface:MailTemplateServiceRemoves the template for the given key and format, if available.- Specified by:
removeFormatin interfaceMailTemplateService- Parameters:
key- mail templateformat- template format
-
-