logger.info("Reading server configuration"); InputStream stream = services.getValues(null, "config/properties", "application/xml", InputStream.class); if (stream == null) return;
logger.info("Reading server configuration"); InputStream stream = services.getValues(null, "config/properties", "application/xml", InputStream.class); if (stream == null) return;
InputStream stream = services.getValues(requestLogger, "config/namespaces", "application/xml", InputStream.class); if (stream == null) return null;
InputStream stream = services.getValues(requestLogger, "config/namespaces", "application/xml", InputStream.class); if (stream == null) return null;
@Override public <T extends StructureReadHandle> T listServices(T listHandle, boolean refresh) { if (listHandle == null) throw new IllegalArgumentException("null handle for listing resource services"); if (logger.isInfoEnabled()) logger.info("Reading resource services list"); HandleImplementation listBase = HandleAccessor.checkHandle(listHandle, "resource"); Format listFormat = listBase.getFormat(); if (!(Format.JSON == listFormat || Format.XML == listFormat)) throw new IllegalArgumentException( "list handle for unsupported format: "+listFormat.getClass().getName()); RequestParameters extraParams = null; if (!refresh) { extraParams = new RequestParameters(); extraParams.put("refresh", "false"); } listBase.receiveContent( services.getValues(requestLogger, "config/resources", extraParams, listFormat.getDefaultMimetype(), listBase.receiveAs()) ); return listHandle; }
@Override public <T extends StructureReadHandle> T listTransforms(T listHandle, boolean refresh) throws ForbiddenUserException, FailedRequestException { if (listHandle == null) throw new IllegalArgumentException("Reading transform list with null handle"); if (logger.isInfoEnabled()) logger.info("Reading transform list"); HandleImplementation listBase = HandleAccessor.checkHandle(listHandle, "transform"); Format listFormat = listBase.getFormat(); if (!(Format.JSON == listFormat || Format.XML == listFormat)) throw new IllegalArgumentException( "list handle for unsupported format: "+listFormat.getClass().getName()); RequestParameters extraParams = null; if (!refresh) { extraParams = new RequestParameters(); extraParams.put("refresh", "false"); } listBase.receiveContent( services.getValues(requestLogger, "config/transforms", extraParams, listFormat.getDefaultMimetype(), listBase.receiveAs()) ); return listHandle; }
@Override public <T extends StructureReadHandle> T listTransforms(T listHandle, boolean refresh) throws ForbiddenUserException, FailedRequestException { if (listHandle == null) throw new IllegalArgumentException("Reading transform list with null handle"); if (logger.isInfoEnabled()) logger.info("Reading transform list"); HandleImplementation listBase = HandleAccessor.checkHandle(listHandle, "transform"); Format listFormat = listBase.getFormat(); if (!(Format.JSON == listFormat || Format.XML == listFormat)) throw new IllegalArgumentException( "list handle for unsupported format: "+listFormat.getClass().getName()); RequestParameters extraParams = null; if (!refresh) { extraParams = new RequestParameters(); extraParams.put("refresh", "false"); } listBase.receiveContent( services.getValues(requestLogger, "config/transforms", extraParams, listFormat.getDefaultMimetype(), listBase.receiveAs()) ); return listHandle; }
@Override public <T extends StructureReadHandle> T listServices(T listHandle, boolean refresh) { if (listHandle == null) throw new IllegalArgumentException("null handle for listing resource services"); if (logger.isInfoEnabled()) logger.info("Reading resource services list"); HandleImplementation listBase = HandleAccessor.checkHandle(listHandle, "resource"); Format listFormat = listBase.getFormat(); if (!(Format.JSON == listFormat || Format.XML == listFormat)) throw new IllegalArgumentException( "list handle for unsupported format: "+listFormat); RequestParameters extraParams = null; if (!refresh) { extraParams = new RequestParameters(); extraParams.put("refresh", "false"); } listBase.receiveContent( services.getValues(requestLogger, "config/resources", extraParams, listFormat.getDefaultMimetype(), listBase.receiveAs()) ); return listHandle; }