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