Search in sources :

Example 1 with Category

use of it.cnr.ict.domain.Category in project cool-jconon by consiglionazionaledellericerche.

the class HelpdeskService method createCategoria.

public Integer createCategoria(Integer idPadre, String nome, String descrizione) {
    Category category = new Category();
    category.setIdPadre(Optional.ofNullable(idPadre).map(Long::valueOf).orElse(new Long(1)));
    category.setNome(nome);
    category.setDescrizione(descrizione);
    return oilService.map(oil -> oil.addCategory(category).intValue()).orElse(null);
}
Also used : CMISService(it.cnr.cool.cmis.service.CMISService) User(it.cnr.ict.domain.User) LoggerFactory(org.slf4j.LoggerFactory) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) Autowired(org.springframework.beans.factory.annotation.Autowired) SimpleDateFormat(java.text.SimpleDateFormat) OilService(it.cnr.ict.service.OilService) Value(org.springframework.beans.factory.annotation.Value) JSONObject(org.json.JSONObject) Calendar(java.util.Calendar) Service(org.springframework.stereotype.Service) State(it.cnr.ict.domain.State) UrlBuilder(org.apache.chemistry.opencmis.commons.impl.UrlBuilder) DateFormat(java.text.DateFormat) FeignException(feign.FeignException) CmisBindingsHelper(org.apache.chemistry.opencmis.client.bindings.impl.CmisBindingsHelper) Response(org.apache.chemistry.opencmis.client.bindings.spi.http.Response) Logger(org.slf4j.Logger) IOException(java.io.IOException) StringUtil(it.cnr.cool.util.StringUtil) CMISUser(it.cnr.cool.security.service.impl.alfresco.CMISUser) HttpStatus(org.springframework.http.HttpStatus) Category(it.cnr.ict.domain.Category) HelpDeskNotConfiguredException(it.cnr.si.cool.jconon.exception.HelpDeskNotConfiguredException) FormData(feign.form.FormData) MultipartFile(org.springframework.web.multipart.MultipartFile) Optional(java.util.Optional) ExternalProblem(it.cnr.ict.domain.ExternalProblem) MailException(org.springframework.mail.MailException) UserService(it.cnr.cool.security.service.UserService) Collections(java.util.Collections) HelpdeskBean(it.cnr.si.cool.jconon.model.HelpdeskBean) I18nService(it.cnr.cool.service.I18nService) Category(it.cnr.ict.domain.Category)

Aggregations

FeignException (feign.FeignException)1 FormData (feign.form.FormData)1 CMISService (it.cnr.cool.cmis.service.CMISService)1 UserService (it.cnr.cool.security.service.UserService)1 CMISUser (it.cnr.cool.security.service.impl.alfresco.CMISUser)1 I18nService (it.cnr.cool.service.I18nService)1 StringUtil (it.cnr.cool.util.StringUtil)1 Category (it.cnr.ict.domain.Category)1 ExternalProblem (it.cnr.ict.domain.ExternalProblem)1 State (it.cnr.ict.domain.State)1 User (it.cnr.ict.domain.User)1 OilService (it.cnr.ict.service.OilService)1 HelpDeskNotConfiguredException (it.cnr.si.cool.jconon.exception.HelpDeskNotConfiguredException)1 HelpdeskBean (it.cnr.si.cool.jconon.model.HelpdeskBean)1 IOException (java.io.IOException)1 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 Calendar (java.util.Calendar)1 Collections (java.util.Collections)1 Optional (java.util.Optional)1