|
|
|
@ -133,7 +133,7 @@ public class ItemsManager {
|
|
|
|
|
toReturn = node2Item.getItem(node, excludes);
|
|
|
|
|
}catch (ItemNotFoundException e) {
|
|
|
|
|
log.error("id {} not found",id,e);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException("id not found", e), Status.NOT_FOUND);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException(id, e), Status.NOT_FOUND);
|
|
|
|
|
}catch(RepositoryException re){
|
|
|
|
|
log.error("jcr error getting item", re);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new BackendGenericError("jcr error searching item", re));
|
|
|
|
@ -177,7 +177,7 @@ public class ItemsManager {
|
|
|
|
|
}
|
|
|
|
|
}catch (ItemNotFoundException e) {
|
|
|
|
|
log.error("id {} not found",id,e);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException("id not found", e), Status.NOT_FOUND);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException(id, e), Status.NOT_FOUND);
|
|
|
|
|
}catch(RepositoryException re){
|
|
|
|
|
log.error("jcr error searching item", re);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new BackendGenericError("jcr error searching item", re));
|
|
|
|
@ -207,7 +207,7 @@ public class ItemsManager {
|
|
|
|
|
toReturn = Utils.getItemCount(ses.getNodeByIdentifier(id), showHidden==null?false:showHidden, nodeType!=null ? ClassHandler.instance().get(nodeType) : null);
|
|
|
|
|
}catch (ItemNotFoundException e) {
|
|
|
|
|
log.error("id {} not found",id,e);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException("id not found", e), Status.NOT_FOUND);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException(id, e), Status.NOT_FOUND);
|
|
|
|
|
}catch(RuntimeException | RepositoryException re){
|
|
|
|
|
log.error("jcr error counting item", re);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new BackendGenericError(re));
|
|
|
|
@ -234,7 +234,7 @@ public class ItemsManager {
|
|
|
|
|
toReturn = Utils.getItemList(ses.getNodeByIdentifier(id), excludes, null, showHidden==null?false:showHidden, nodeType!=null ? ClassHandler.instance().get(nodeType) : null);
|
|
|
|
|
}catch (ItemNotFoundException e) {
|
|
|
|
|
log.error("id {} not found",id,e);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException("id not found", e), Status.NOT_FOUND);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException(id, e), Status.NOT_FOUND);
|
|
|
|
|
}catch(RepositoryException re){
|
|
|
|
|
log.error("jcr error getting children", re);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new BackendGenericError(re));
|
|
|
|
@ -262,7 +262,7 @@ public class ItemsManager {
|
|
|
|
|
toReturn = Utils.getItemList(ses.getNodeByIdentifier(id), excludes, new Range(start, limit),showHidden==null?false:showHidden, nodeType!=null ? ClassHandler.instance().get(nodeType) : null);
|
|
|
|
|
}catch (ItemNotFoundException e) {
|
|
|
|
|
log.error("id {} not found",id,e);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException("id not found", e), Status.NOT_FOUND);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new IdNotFoundException(id, e), Status.NOT_FOUND);
|
|
|
|
|
}catch(RepositoryException re){
|
|
|
|
|
log.error("jcr error getting paged children", re);
|
|
|
|
|
GXOutboundErrorResponse.throwException(new BackendGenericError(re));
|
|
|
|
|