@Override public void addPathContentsForTrailingPath( final List<Content> contents, final String trailingPath) { AbstractPathProcessor strategy = getStrategy(); final Container container = (Container) strategy.processPath(trailingPath); if (container == null) { throw new InvalidContentPathException(this, trailingPath); } contents.add(container); final int size = contents.size(); String newTrailingPath = strategy.getTrailingPath(trailingPath); container.addPathContentsForTrailingPath(contents, newTrailingPath); if (contents.size() == size && !(newTrailingPath.length() == 0 || (newTrailingPath.length() == 1 && newTrailingPath.charAt(0) == '/'))) { throw new InvalidContentPathException(this, newTrailingPath); } }
public AbstractPathProcessor getStrategy() { return AbstractPathProcessor.findStrategyFor(this.getMetaDomainObject().getType()); }