/** * Extracts all the paths defined in the package's manifest.xml; additionally it recognizes the * folder paths (the paths defined in an add-replace element with aspect="folder". * * @param pciPackage * @see #inputFilePaths * @see #manifestFolderPaths * @see #hasFolderAspect(com.wolterskluwer.pci.schema.v3.Action) */ private void scanManifestPathsAllowFolder(PciPackage pciPackage) { Collection<Action> actions = pciPackage.getAddReplaceActions(); for (Action action : actions) { String path = action.getAddReplace().getObjectMCPPathAttr(); if (hasFolderAspect(action)) { manifestFolderPaths.add(path); } else { manifestFilePaths.add(path); } } }
/** * Determines whether the given Action instance has an add-replace element with aspect="folder". * * @param action an <code>Action</code> instant to test * @return */ private static boolean hasFolderAspect(Action action) { return "folder".equals(action.getAddReplace().getAspect().value()); }
/** * Extracts all the paths defined in the package's manifest.xml. * * @param pciPackage a <code>PciPackage</code> instance to scan for the manifest files * @see #manifestFilePaths */ private void scanManifestPaths(PciPackage pciPackage) { Collection<Action> actions = pciPackage.getAddReplaceActions(); for (Action action : actions) { manifestFilePaths.add(action.getAddReplace().getObjectMCPPathAttr()); } }