@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { // parse remaining to extract resourcePath and queryParams final String[] pathSegments = remaining.split("/", -1); final String methodName = pathSegments[0]; if (pathSegments.length > 1) { final StringBuilder resourcePath = new StringBuilder(); for (int i = 1; i < pathSegments.length; i++) { resourcePath.append(pathSegments[i]); if (i < (pathSegments.length - 1)) { resourcePath.append('/'); } } // This will override any URI supplied ?resourcePath=... param parameters.put(Olingo2Endpoint.RESOURCE_PATH_PROPERTY, resourcePath.toString()); } final Olingo2Configuration endpointConfiguration = createEndpointConfiguration(Olingo2ApiName.DEFAULT); final Endpoint endpoint = createEndpoint(uri, methodName, Olingo2ApiName.DEFAULT, endpointConfiguration); // set endpoint property inBody setProperties(endpoint, parameters); // configure endpoint properties and initialize state endpoint.configureProperties(parameters); return endpoint; }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { // parse remaining to extract resourcePath and queryParams final String[] pathSegments = remaining.split("/", -1); final String methodName = pathSegments[0]; if (pathSegments.length > 1) { final StringBuilder resourcePath = new StringBuilder(); for (int i = 1; i < pathSegments.length; i++) { resourcePath.append(pathSegments[i]); if (i < (pathSegments.length - 1)) { resourcePath.append('/'); } } // This will override any URI supplied ?resourcePath=... param parameters.put(Olingo2Endpoint.RESOURCE_PATH_PROPERTY, resourcePath.toString()); } final Olingo2Configuration endpointConfiguration = createEndpointConfiguration(Olingo2ApiName.DEFAULT); final Endpoint endpoint = createEndpoint(uri, methodName, Olingo2ApiName.DEFAULT, endpointConfiguration); // set endpoint property inBody setProperties(endpoint, parameters); // configure endpoint properties and initialize state endpoint.configureProperties(parameters); return endpoint; }
/** * Create an Endpoint from a fcrepo uri along with an optional path value and attributes. * @param uri the fcrepo uri identifying the repository hostname and port * @param remaining the string identifying the repository path * @param parameters any optional attributes added to the endpoint * @return the camel endpoint */ @Override protected Endpoint createEndpoint(final String uri, final String remaining, final Map<String, Object> parameters) { final FcrepoConfiguration newConfig; if (configuration == null) { newConfig = new FcrepoConfiguration(); } else { newConfig = configuration.clone(); } final Endpoint endpoint = new FcrepoEndpoint(uri, remaining, this, newConfig); endpoint.configureProperties(parameters); LOGGER.debug("Created Fcrepo Endpoint [{}]", endpoint); return endpoint; } }