protected void processPath() { PathSegmentImpl.SegmentParse parse = PathSegmentImpl.parseSegmentsOptimization(encodedPath, false); encodedPathSegments = parse.segments; this.pathSegments = new ArrayList<PathSegment>(encodedPathSegments.size()); for (PathSegment segment : encodedPathSegments) { pathSegments.add(new PathSegmentImpl(((PathSegmentImpl) segment).getOriginal(), true)); } extractParameters(requestURI.getRawQuery()); if (parse.hasMatrixParams) extractMatchingPath(encodedPathSegments); else { matchingPath = encodedPath; if (matchingPath.length() > 1 && matchingPath.endsWith("/")) { matchingPath = matchingPath.substring(0, matchingPath.length() - 1); } } }
if (preprocessed) segments = PathSegmentImpl.parseSegments(rebuilt.toString(), false);
start = slash + 1; PathSegmentImpl pathSegment = new PathSegmentImpl(p, decode); parse.hasMatrixParams |= pathSegment.hasMatrixParams(); pathSegments.add(pathSegment); } while (start < length);
@Override public boolean deleteCSNodes(final List<Integer> csNodeIds) { try { final String pathString = "ids;" + CollectionUtilities.toSeperatedString(csNodeIds, ";"); final PathSegment path = new PathSegmentImpl(pathString, false); final RESTCSNodeCollectionV1 csNodes = getRESTClient().deleteJSONContentSpecNodes(path, ""); return csNodes != null; } catch (Exception e) { log.debug("Failed to delete the list of CSNodes", e); throw handleException(e); } }
public static List<PathSegment> parseSegments(String path, boolean decode) { return parseSegmentsOptimization(path, decode).segments; }
@Override public boolean deleteTranslatedTopics(final List<Integer> topicIds) { try { final String pathString = "ids;" + CollectionUtilities.toSeperatedString(topicIds, ";"); final PathSegment path = new PathSegmentImpl(pathString, false); final RESTTranslatedTopicCollectionV1 topics = getRESTClient().deleteJSONTranslatedTopics(path, ""); return topics != null; } catch (Exception e) { log.debug("", e); throw handleException(e); } }
public static List<PathSegment> parseSegments(String path, boolean decode) { return parseSegmentsOptimization(path, decode).segments; }
protected void processPath() { PathSegmentImpl.SegmentParse parse = PathSegmentImpl.parseSegmentsOptimization(encodedPath, false); encodedPathSegments = parse.segments; this.pathSegments = new ArrayList<PathSegment>(encodedPathSegments.size()); for (PathSegment segment : encodedPathSegments) { pathSegments.add(new PathSegmentImpl(((PathSegmentImpl) segment).getOriginal(), true)); } extractParameters(requestURI.getRawQuery()); if (parse.hasMatrixParams) extractMatchingPath(encodedPathSegments); else { matchingPath = encodedPath; if (matchingPath.length() > 1 && matchingPath.endsWith("/")) { matchingPath = matchingPath.substring(0, matchingPath.length() - 1); } } }
public RESTCSNodeCollectionV1 getRESTCSNodesWithQuery(final String query) { if (query == null || query.isEmpty()) return null; try { // We need to expand the all the content specs in the collection final String expandString = getExpansionString(RESTv1Constants.CONTENT_SPEC_NODE_EXPANSION_NAME, DEFAULT_EXPANSION); final RESTCSNodeCollectionV1 csNodes = getRESTClient().getJSONContentSpecNodesWithQuery(new PathSegmentImpl(query, false), expandString); getRESTEntityCache().add(csNodes); return csNodes; } catch (Exception e) { log.debug("Failed to retrieve CSNodes with Query: " + query, e); throw handleException(e); } }
start = slash + 1; PathSegmentImpl pathSegment = new PathSegmentImpl(p, decode); parse.hasMatrixParams |= pathSegment.hasMatrixParams(); pathSegments.add(pathSegment); } while (start < length);
if (preprocessed) segments = PathSegmentImpl.parseSegments(rebuilt.toString(), false);
public static List<PathSegment> parseSegments(String path, boolean decode) { return parseSegmentsOptimization(path, decode).segments; }
protected void processPath() { PathSegmentImpl.SegmentParse parse = PathSegmentImpl.parseSegmentsOptimization(encodedPath, false); encodedPathSegments = parse.segments; this.pathSegments = new ArrayList<PathSegment>(encodedPathSegments.size()); for (PathSegment segment : encodedPathSegments) { pathSegments.add(new PathSegmentImpl(((PathSegmentImpl) segment).getOriginal(), true)); } extractParameters(requestURI.getRawQuery()); if (parse.hasMatrixParams) extractMatchingPath(encodedPathSegments); else { matchingPath = encodedPath; if (matchingPath.length() > 1 && matchingPath.endsWith("/")) { matchingPath = matchingPath.substring(0, matchingPath.length() - 1); } } }
public RESTTranslatedTopicCollectionV1 getRESTTranslatedTopicsWithQuery(String query) { if (query == null || query.isEmpty()) return null; try { // We need to expand the all the translated topics in the collection final String expandString = getExpansionString(RESTv1Constants.TRANSLATEDTOPICS_EXPANSION_NAME, DEFAULT_EXPAND_MAP_WITH_TOPIC); final RESTTranslatedTopicCollectionV1 topics = getRESTClient().getJSONTranslatedTopicsWithQuery( new PathSegmentImpl(query, false), expandString); getRESTEntityCache().add(topics); return topics; } catch (Exception e) { log.debug("Failed to retrieve Translated Topics with Query: " + query, e); throw handleException(e); } }
start = slash + 1; PathSegmentImpl pathSegment = new PathSegmentImpl(p, decode); parse.hasMatrixParams |= pathSegment.hasMatrixParams(); pathSegments.add(pathSegment); } while (start < length);
if (preprocessed) segments = PathSegmentImpl.parseSegments(rebuilt.toString(), false);
public RESTTranslatedContentSpecCollectionV1 getRESTTranslatedContentSpecsWithQuery(String query) { if (query == null || query.isEmpty()) return null; try { // We need to expand the all the Translated Content Specs in the collection final String expandString = getExpansionString(RESTv1Constants.TRANSLATED_CONTENT_SPEC_EXPANSION_NAME, DEFAULT_EXPANSION_WITH_CHILDREN); final RESTTranslatedContentSpecCollectionV1 contentSpecs = getRESTClient().getJSONTranslatedContentSpecsWithQuery( new PathSegmentImpl(query, false), expandString); getRESTEntityCache().add(contentSpecs); return contentSpecs; } catch (Exception e) { log.debug("Failed to retrieve Translated Content Specs with a query", e); throw handleException(e); } }
List<PathSegment> pathSegments = PathSegmentImpl.parseSegments(path, false);
public RESTTextContentSpecCollectionV1 getRESTTextContentSpecsWithQuery(final String query) { if (query == null || query.isEmpty()) return null; try { // We need to expand the all the content specs in the collection final Set<String> subCollection = getDefaultContentSpecExpansionList(); subCollection.remove(RESTTextContentSpecV1.TEXT_NAME); final String expandString = getExpansionString(RESTv1Constants.CONTENT_SPEC_EXPANSION_NAME, subCollection); final RESTTextContentSpecCollectionV1 contentSpecs = getRESTClient().getJSONTextContentSpecsWithQuery( new PathSegmentImpl(query, false), expandString); getRESTEntityCache().add(contentSpecs); return contentSpecs; } catch (Exception e) { log.debug("Failed to retrieve ContentSpecs with Query: " + query, e); throw handleException(e); } }
public RESTTopicCollectionV1 getRESTTopicsWithQuery(final String query) { if (query == null || query.isEmpty()) return null; try { // We need to expand the all the topics in the collection final String expandString = getExpansionString(RESTv1Constants.TOPICS_EXPANSION_NAME, getDefaultTopicExpansionList()); final RESTTopicCollectionV1 topics = getRESTClient().getJSONTopicsWithQuery(new PathSegmentImpl(query, false), expandString); getRESTEntityCache().add(topics); return topics; } catch (Exception e) { LOG.debug("Failed to retrieve Topics with Query: " + query, e); throw handleException(e); } }