use of nikita.common.model.noark5.v4.interfaces.entities.INikitaEntity in project nikita-noark5-core by HiOA-ABI.
the class CommentTypeService method findByDescription.
/**
* Retrieve all CommentType that have a given description.
* <br>
* Note, this will be replaced by OData search.
*
* @param description Description of object you wish to retrieve. The
* whole text, this is an exact search.
* @return A list of CommentType objects wrapped as a MetadataHateoas
* object
*/
@Override
public MetadataHateoas findByDescription(String description) {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) commentTypeRepository.findByDescription(description), COMMENT_TYPE);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.interfaces.entities.INikitaEntity in project nikita-noark5-core by HiOA-ABI.
the class CommentTypeService method findAll.
// All READ operations
/**
* Retrieve a list of all CommentType objects
*
* @return list of CommentType objects wrapped as a
* MetadataHateoas object
*/
@Override
public MetadataHateoas findAll() {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) commentTypeRepository.findAll(), COMMENT_TYPE);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.interfaces.entities.INikitaEntity in project nikita-noark5-core by HiOA-ABI.
the class CountryService method findAll.
// All READ operations
/**
* Retrieve a list of all Country objects
*
* @return list of Country objects wrapped as a
* MetadataHateoas object
*/
@Override
public MetadataHateoas findAll() {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) countryRepository.findAll(), COUNTRY);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.interfaces.entities.INikitaEntity in project nikita-noark5-core by HiOA-ABI.
the class DocumentTypeService method findByDescription.
/**
* Retrieve all documentType that have a given description.
* <br>
* Note, this will be replaced by OData search.
*
* @param description
* @return A list of documentType objects wrapped as a MetadataHateoas
* object
*/
@Override
public MetadataHateoas findByDescription(String description) {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) documentTypeRepository.findByDescription(description), DOCUMENT_TYPE);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
use of nikita.common.model.noark5.v4.interfaces.entities.INikitaEntity in project nikita-noark5-core by HiOA-ABI.
the class ElectronicSignatureSecurityLevelService method findByCode.
/**
* retrieve all ElectronicSignatureSecurityLevel 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 ElectronicSignatureSecurityLevel objects wrapped as a
* MetadataHateoas object
*/
@Override
public MetadataHateoas findByCode(String code) {
MetadataHateoas metadataHateoas = new MetadataHateoas((List<INikitaEntity>) (List) electronicSignatureSecurityLevelRepository.findByCode(code), ELECTRONIC_SIGNATURE_SECURITY_LEVEL);
metadataHateoasHandler.addLinks(metadataHateoas, new Authorisation());
return metadataHateoas;
}
Aggregations