use of nikita.common.model.noark5.v4.metadata.PrecedenceStatus in project nikita-noark5-core by HiOA-ABI.
the class PrecedenceStatusService method findAll.
// All READ operations
/**
* Retrieve a list of all PrecedenceStatus objects
*
* @return list of PrecedenceStatus objects wrapped as a
* MetadataHateoas object
*/
@Override
public MetadataHateoas findAll() {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) precedenceStatusRepository.findAll(), PRECEDENCE_STATUS);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.metadata.PrecedenceStatus in project nikita-noark5-core by HiOA-ABI.
the class PrecedenceStatusService method findByCode.
/**
* retrieve all PrecedenceStatus that have a particular code.
* <br>
* Note, this will be replaced by OData search.
*
* @param code The code of the object you wish to retrieve
* @return A list of PrecedenceStatus objects wrapped as a MetadataHateoas
* object
*/
@Override
public MetadataHateoas findByCode(String code) {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) precedenceStatusRepository.findByCode(code), PRECEDENCE_STATUS);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.metadata.PrecedenceStatus in project nikita-noark5-core by HiOA-ABI.
the class PrecedenceStatusService method generateDefaultPrecedenceStatus.
/**
* Generate a default PrecedenceStatus object
*
* @return the PrecedenceStatus object
*/
@Override
public PrecedenceStatus generateDefaultPrecedenceStatus() {
PrecedenceStatus precedenceStatus = new PrecedenceStatus();
precedenceStatus.setCode(TEMPLATE_PRECEDENCE_STATUS_CODE);
precedenceStatus.setDescription(TEMPLATE_PRECEDENCE_STATUS_DESCRIPTION);
return precedenceStatus;
}
Aggregations