Ejemplo n.º 1
0
 @Override
 public File[] getTargetModulePath() {
   // We need the updated state for invalidating one-off patches
   // When applying the overlay directory should not exist yet
   final PatchableTarget.TargetInfo updated =
       mode == Mode.APPLY ? delegate : delegate.getModifiedState();
   return PatchUtils.getModulePath(delegate.getDirectoryStructure(), updated);
 }
Ejemplo n.º 2
0
 @Override
 public void rollback(String patchId) {
   rollbacks.add(patchId);
   // Rollback
   delegate.rollback(patchId);
   // Record rollback loader
   recordRollbackLoader(patchId, delegate);
 }
Ejemplo n.º 3
0
 @Override
 public File getTargetFile(ContentItem item) {
   if (item.getContentType() == ContentType.MISC) {
     return IdentityPatchContext.this.getTargetFile((MiscContentItem) item);
   }
   if (applyPatchId == null || state == State.ROLLBACK_ONLY) {
     throw new IllegalStateException(
         "cannot process rollback tasks for modules/bundles"); // internal wrong usage, no i18n
   }
   final File root;
   final DirectoryStructure structure = delegate.getDirectoryStructure();
   if (item.getContentType() == ContentType.BUNDLE) {
     root = structure.getBundlesPatchDirectory(applyPatchId);
   } else {
     root = structure.getModulePatchDirectory(applyPatchId);
   }
   return PatchContentLoader.getModulePath(root, (ModuleItem) item);
 }
Ejemplo n.º 4
0
 @Override
 public PatchableTarget.TargetInfo getModifiedState() {
   return delegate.getModifiedState();
 }
Ejemplo n.º 5
0
 @Override
 public DirectoryStructure getDirectoryStructure() {
   return delegate.getDirectoryStructure();
 }
Ejemplo n.º 6
0
 @Override
 public Properties getProperties() {
   return delegate.getProperties();
 }
Ejemplo n.º 7
0
 @Override
 public List<String> getPatchIDs() {
   return delegate.getPatchIDs();
 }
Ejemplo n.º 8
0
 @Override
 public String getCumulativePatchID() {
   return delegate.getCumulativePatchID();
 }
Ejemplo n.º 9
0
 @Override
 public void apply(String patchId, Patch.PatchType patchType) {
   delegate.apply(patchId, patchType);
   applyPatchId = patchId;
 }
Ejemplo n.º 10
0
 @Override
 public boolean isApplied(String patchId) {
   return delegate.isApplied(patchId);
 }