@Override protected boolean validate0(PatchingArtifactValidationContext context) { if (!file.isDirectory()) { context.getErrorHandler().addInconsistent(artifact, this); return false; } return true; }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (patch != null) { return true; } try { final PatchMetadataResolver resolver = PatchXml.parse(xmlFile, context.getInstalledIdentity()); patch = artifact.resolveMetaData(resolver); return true; } catch (Exception e) { context.getErrorHandler().addError(artifact, this); } return false; }
@Override public boolean process(PatchingXmlArtifact.XmlArtifactState<RollbackPatch> parent, PatchingArtifactProcessor processor) { final RollbackPatch patch = parent.getPatch(); final PatchingArtifacts.PatchID patchID = processor.getParentArtifact(PatchingArtifacts.HISTORY_RECORD); final InstalledIdentity identity = patch.getIdentityState(); processor.getValidationContext().setCurrentPatchIdentity(identity); final State state = new State(identity, patchID); if (identity == null) { processor.getValidationContext().getErrorHandler().addMissing(PatchingArtifacts.ROLLBACK_TARGET, state); return false; } else { return processor.process(this, state); } }
@Override public boolean process(PatchingArtifacts.PatchID parent, PatchingArtifactProcessor processor) { final InstalledIdentity identity = processor.getValidationContext().getInstalledIdentity(); final File history = identity.getInstalledImage().getPatchHistoryDir(parent.getPatchID()); final PatchingFileArtifact.DirectoryArtifactState state = new PatchingFileArtifact.DirectoryArtifactState(history, this); return processor.process(this, state); }
@Override public boolean process(PatchingXmlArtifact.XmlArtifactState<RollbackPatch> parent, PatchingArtifactProcessor processor) { final RollbackPatch patch = parent.getPatch(); final PatchingArtifacts.PatchID patchID = processor.getParentArtifact(PatchingArtifacts.HISTORY_RECORD); final InstalledIdentity identity = patch.getIdentityState(); processor.getValidationContext().setCurrentPatchIdentity(identity); final State state = new State(identity, patchID); if (identity == null) { processor.getValidationContext().getErrorHandler().addMissing(PatchingArtifacts.ROLLBACK_TARGET, state); return false; } else { return processor.process(this, state); } }
@Override public boolean process(PatchingArtifacts.PatchID parent, PatchingArtifactProcessor processor) { final InstalledIdentity identity = processor.getValidationContext().getInstalledIdentity(); final File history = identity.getInstalledImage().getPatchHistoryDir(parent.getPatchID()); final PatchingFileArtifact.DirectoryArtifactState state = new PatchingFileArtifact.DirectoryArtifactState(history, this); return processor.process(this, state); }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (target == null) { context.getErrorHandler().addMissing(PatchingArtifacts.PATCH_CONTENTS, this); } return true; }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (patch != null) { return true; } try { final PatchMetadataResolver resolver = PatchXml.parse(xmlFile, context.getInstalledIdentity()); patch = artifact.resolveMetaData(resolver); return true; } catch (Exception e) { context.getErrorHandler().addError(artifact, this); } return false; }
@Override public boolean process(PatchingXmlArtifact.XmlArtifactState<Patch> parent, PatchingArtifactProcessor processor) { final InstalledIdentity identity = processor.getValidationContext().getInstalledIdentity(); final Patch patch = parent.getPatch(); if (Constants.BASE.equals(patch.getPatchId())) {
protected boolean validate0(PatchingArtifactValidationContext context) { if (file.isDirectory()) { context.getErrorHandler().addInconsistent(artifact, this); return false; } return true; }
@Override public boolean process(PatchingXmlArtifact.XmlArtifactState<Patch> parent, PatchingArtifactProcessor processor) { final InstalledIdentity identity = processor.getValidationContext().getInstalledIdentity(); final Patch patch = parent.getPatch(); if (Constants.BASE.equals(patch.getPatchId())) {
protected boolean validate0(PatchingArtifactValidationContext context) { if (file.isDirectory()) { context.getErrorHandler().addInconsistent(artifact, this); return false; } return true; }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (target == null) { context.getErrorHandler().addMissing(PatchingArtifacts.PATCH_CONTENTS, this); } return true; }
@Override protected boolean validate0(PatchingArtifactValidationContext context) { if (!file.isDirectory()) { context.getErrorHandler().addInconsistent(artifact, this); return false; } return true; }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (file == null) { context.getErrorHandler().addError(artifact, this); return false; } else if (!file.exists()) { context.getErrorHandler().addMissing(artifact, this); return false; } return validate0(context); }
@Override public boolean isValid(PatchingArtifactValidationContext context) { if (file == null) { context.getErrorHandler().addError(artifact, this); return false; } else if (!file.exists()) { context.getErrorHandler().addMissing(artifact, this); return false; } return validate0(context); }
@Override public boolean isValid(PatchingArtifactValidationContext context) { try { // Check the target state we are rolling back to final PatchableTarget.TargetInfo target = rollbackIdentity.getIdentity().loadTargetInfo(); final List<String> patches = target.getPatchIDs(); final String rollbackTo; if (patches.isEmpty()) { rollbackTo = target.getCumulativePatchID(); } else { rollbackTo = patches.get(0); } final String ref = reference.getNextPatchID(); if (rollbackTo.equals(ref)) { return true; } else if (ref == null && Constants.BASE.equals(rollbackTo)) { return true; } else { context.getErrorHandler().addInconsistent(PatchingArtifacts.ROLLBACK_TARGET, this); } } catch (IOException e) { context.getErrorHandler().addError(PatchingArtifacts.ROLLBACK_TARGET, this); } return false; }
@Override public boolean isValid(PatchingArtifactValidationContext context) { try { // Check the target state we are rolling back to final PatchableTarget.TargetInfo target = rollbackIdentity.getIdentity().loadTargetInfo(); final List<String> patches = target.getPatchIDs(); final String rollbackTo; if (patches.isEmpty()) { rollbackTo = target.getCumulativePatchID(); } else { rollbackTo = patches.get(0); } final String ref = reference.getNextPatchID(); if (rollbackTo.equals(ref)) { return true; } else if (ref == null && Constants.BASE.equals(rollbackTo)) { return true; } else { context.getErrorHandler().addInconsistent(PatchingArtifacts.ROLLBACK_TARGET, this); } } catch (IOException e) { context.getErrorHandler().addError(PatchingArtifacts.ROLLBACK_TARGET, this); } return false; }