use of nikita.common.model.noark5.v4.metadata.SignOffMethod in project nikita-noark5-core by HiOA-ABI.
the class SignOffMethodService method createNewSignOffMethod.
// All CREATE operations
/**
* Persists a new SignOffMethod object to the database.
*
* @param SignOffMethod SignOffMethod object with values set
* @return the newly persisted SignOffMethod object wrapped as a
* MetadataHateoas object
*/
@Override
public MetadataHateoas createNewSignOffMethod(SignOffMethod SignOffMethod) {
SignOffMethod.setDeleted(false);
SignOffMethod.setOwnedBy(SecurityContextHolder.getContext().getAuthentication().getName());
MetadataHateoas metadataHateoas = new MetadataHateoas(SignOffMethodRepository.save(SignOffMethod));
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.metadata.SignOffMethod in project nikita-noark5-core by HiOA-ABI.
the class SignOffMethodService method findAll.
// All READ operations
/**
* Retrieve a list of all SignOffMethod objects
*
* @return list of SignOffMethod objects wrapped as a MetadataHateoas object
*/
@Override
public MetadataHateoas findAll() {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) SignOffMethodRepository.findAll(), SIGN_OFF_METHOD);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.metadata.SignOffMethod in project nikita-noark5-core by HiOA-ABI.
the class SignOffMethodService method generateDefaultSignOffMethod.
/**
* Generate a default SignOffMethod object
*
* @return the SignOffMethod object wrapped as a SignOffMethodHateoas object
*/
@Override
public SignOffMethod generateDefaultSignOffMethod() {
SignOffMethod SignOffMethod = new SignOffMethod();
SignOffMethod.setCode(TEMPLATE_SIGN_OFF_METHOD_CODE);
SignOffMethod.setDescription(TEMPLATE_SIGN_OFF_METHOD_DESCRIPTION);
return SignOffMethod;
}
Aggregations