@GET
public NFCResourceResponse get(Context context, Request request, Response response, Variant variant)
throws ResourceException
{
try {
NFCResource resource = new NFCResource();
// check reposes
if (getRepositoryGroupId(request) != null) {
for (Repository repository : getRepositoryRegistry()
.getRepositoryWithFacet(getRepositoryGroupId(request), GroupRepository.class)
.getMemberRepositories()) {
NFCRepositoryResource repoNfc = createNFCRepositoryResource(repository);
resource.addNfcContent(repoNfc);
}
}
else if (getRepositoryId(request) != null) {
Repository repository = getRepositoryRegistry().getRepository(getRepositoryId(request));
NFCRepositoryResource repoNfc = createNFCRepositoryResource(repository);
resource.addNfcContent(repoNfc);
}
NFCResourceResponse result = new NFCResourceResponse();
result.setData(resource);