public HardcodedPathResource(String type, PathEntry entry) { super(type, entry.getName()); this.entry = entry; }
public HardcodedPathResource(String type, PathEntry entry) { super(type, entry.getName()); this.entry = entry; }
public HardcodedPathResource(String type, PathEntry entry) { super(type, entry.getName()); this.entry = entry; }
public HardcodedPathResource(String type, PathEntry entry) { super(type, entry.getName()); this.entry = entry; }
public final void addPathManagerResources(Resource resource) { synchronized (pathEntries) { for (PathEntry pathEntry : pathEntries.values()) { resource.registerChild(PathElement.pathElement(PATH, pathEntry.getName()), new HardcodedPathResource(PATH, pathEntry)); } } }
public final void addPathManagerResources(Resource resource) { synchronized (pathEntries) { for (PathEntry pathEntry : pathEntries.values()) { resource.registerChild(PathElement.pathElement(PATH, pathEntry.getName()), new HardcodedPathResource(PATH, pathEntry)); } } }
/** * Add child resources to the given resource, one for each {@link PathEntry} currently associated with this * path manager. Used to initialize the model with resources for the standard paths that are not part of * the persistent configuration. * @param resource the resource to which children should be added. */ public final void addPathManagerResources(Resource resource) { synchronized (pathEntries) { for (PathEntry pathEntry : pathEntries.values()) { resource.registerChild(PathElement.pathElement(PATH, pathEntry.getName()), new HardcodedPathResource(PATH, pathEntry)); } } }
final void changeRelativePathServices(final OperationContext operationContext, String pathName, String relativeTo) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathEntry.getName()); if (relativeTo == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath()); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), false, relativeTo); } }
/** * Add child resources to the given resource, one for each {@link PathEntry} currently associated with this * path manager. Used to initialize the model with resources for the standard paths that are not part of * the persistent configuration. * @param resource the resource to which children should be added. */ public final void addPathManagerResources(Resource resource) { synchronized (pathEntries) { for (PathEntry pathEntry : pathEntries.values()) { resource.registerChild(PathElement.pathElement(PATH, pathEntry.getName()), new HardcodedPathResource(PATH, pathEntry)); } } }
final void changeRelativePathServices(final OperationContext operationContext, String pathName, String relativeTo, ServiceVerificationHandler verificationHandler) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathEntry.getName()); if (relativeTo == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), verificationHandler); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), false, relativeTo, verificationHandler); } }
final void changeRelativePathServices(final OperationContext operationContext, String pathName, String relativeTo, ServiceVerificationHandler verificationHandler) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathEntry.getName()); if (relativeTo == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), verificationHandler); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), false, relativeTo, verificationHandler); } }
final void changeRelativePathServices(final OperationContext operationContext, String pathName, String relativeTo) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathEntry.getName()); if (relativeTo == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath()); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), pathEntry.getPath(), false, relativeTo); } }
final void removePathEntry(final String pathName, boolean check) throws OperationFailedException{ synchronized (pathEntries) { PathEntry pathEntry = pathEntries.get(pathName); if (pathEntry.isReadOnly()) { throw MESSAGES.pathEntryIsReadOnly(pathName); } Set<String> dependents = dependenctRelativePaths.get(pathName); if (check && dependents != null) { throw MESSAGES.cannotRemovePathWithDependencies(pathName, dependents); } pathEntries.remove(pathName); triggerCallbacksForEvent(pathEntry, Event.REMOVED); if (pathEntry.getRelativeTo() != null) { dependents = dependenctRelativePaths.get(pathEntry.getRelativeTo()); if (dependents != null) { dependents.remove(pathEntry.getName()); if (dependents.size() == 0) { dependenctRelativePaths.remove(pathEntry.getRelativeTo()); } } } } }
final void removePathEntry(final String pathName, boolean check) throws OperationFailedException{ synchronized (pathEntries) { PathEntry pathEntry = pathEntries.get(pathName); if (pathEntry.isReadOnly()) { throw MESSAGES.pathEntryIsReadOnly(pathName); } Set<String> dependents = dependenctRelativePaths.get(pathName); if (check && dependents != null) { throw MESSAGES.cannotRemovePathWithDependencies(pathName, dependents); } pathEntries.remove(pathName); triggerCallbacksForEvent(pathEntry, Event.REMOVED); if (pathEntry.getRelativeTo() != null) { dependents = dependenctRelativePaths.get(pathEntry.getRelativeTo()); if (dependents != null) { dependents.remove(pathEntry.getName()); if (dependents.size() == 0) { dependenctRelativePaths.remove(pathEntry.getRelativeTo()); } } } } }
final void changeRelativePath(String pathName, String relativePath, boolean check) throws OperationFailedException { PathEntry pathEntry = findPathEntry(pathName); synchronized (pathEntries) { if (pathEntry.getRelativeTo() != null) { Set<String> dependents = dependenctRelativePaths.get(pathEntry.getRelativeTo()); dependents.remove(pathEntry.getName()); } if (check && relativePath != null && pathEntries.get(relativePath) == null) { throw MESSAGES.pathEntryNotFound(pathName); } pathEntry.setRelativeTo(relativePath); pathEntry.setPathResolver(relativePath == null ? absoluteResolver : relativeResolver); addDependent(pathEntry.getName(), pathEntry.getRelativeTo()); } triggerCallbacksForEvent(pathEntry, Event.UPDATED); }
final void changeRelativePath(String pathName, String relativePath, boolean check) throws OperationFailedException { PathEntry pathEntry = findPathEntry(pathName); synchronized (pathEntries) { if (pathEntry.getRelativeTo() != null) { Set<String> dependents = dependenctRelativePaths.get(pathEntry.getRelativeTo()); dependents.remove(pathEntry.getName()); } if (check && relativePath != null && pathEntries.get(relativePath) == null) { throw MESSAGES.pathEntryNotFound(pathName); } pathEntry.setRelativeTo(relativePath); pathEntry.setPathResolver(relativePath == null ? absoluteResolver : relativeResolver); addDependent(pathEntry.getName(), pathEntry.getRelativeTo()); } triggerCallbacksForEvent(pathEntry, Event.UPDATED); }
final void changePathServices(final OperationContext operationContext, String pathName, String path) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathName); if (pathEntry.getRelativeTo() == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), path); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, false, pathEntry.getRelativeTo()); } }
final void changePathServices(final OperationContext operationContext, String pathName, String path, ServiceVerificationHandler verificationHandler) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathName); if (pathEntry.getRelativeTo() == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, verificationHandler); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, false, pathEntry.getRelativeTo(), verificationHandler); } }
final void changePathServices(final OperationContext operationContext, String pathName, String path) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathName); if (pathEntry.getRelativeTo() == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), path); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, false, pathEntry.getRelativeTo()); } }
final void changePathServices(final OperationContext operationContext, String pathName, String path, ServiceVerificationHandler verificationHandler) { PathEntry pathEntry = findPathEntry(pathName); removePathService(operationContext, pathName); if (pathEntry.getRelativeTo() == null) { addAbsolutePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, verificationHandler); } else { addRelativePathService(operationContext.getServiceTarget(), pathEntry.getName(), path, false, pathEntry.getRelativeTo(), verificationHandler); } }