Class ResourceChangeHandler

java.lang.Object
ro.isdc.wro.maven.plugin.support.ResourceChangeHandler

public class ResourceChangeHandler extends Object
Encapsulates the details about resource change detection and persist the change information in build context.
Since:
1.7.2
Author:
Alex Objelean
  • Method Details

    • create

      public static ResourceChangeHandler create(WroManagerFactory managerFactory, org.apache.maven.plugin.logging.Log log)
      Factory method which requires all mandatory fields.
    • isResourceChanged

      public boolean isResourceChanged(Resource resource)
    • remember

      public void remember(Resource resource)
      Will persist the information regarding the provided resource in some internal store. This information will be used later to check if the resource is changed.
      Parameters:
      resource - Resource to touch.
    • getLog

      public org.apache.maven.plugin.logging.Log getLog()
    • setManagerFactory

      public ResourceChangeHandler setManagerFactory(WroManagerFactory wroManagerFactory)
    • setLog

      public ResourceChangeHandler setLog(org.apache.maven.plugin.logging.Log log)
    • setBuildContext

      public ResourceChangeHandler setBuildContext(org.sonatype.plexus.build.incremental.BuildContext buildContext)
    • setBuildDirectory

      public ResourceChangeHandler setBuildDirectory(File buildDirectory)
    • setIncrementalBuildEnabled

      public ResourceChangeHandler setIncrementalBuildEnabled(boolean incrementalBuildEnabled)
    • isIncrementalBuild

      public boolean isIncrementalBuild()
    • destroy

      public void destroy()
      Destroys all information about resource tracked for changes.
    • forget

      public void forget(Resource resource)
      After invoking this method on a resource, the next invocation of isResourceChanged(Resource) will return true.
      Parameters:
      resource - The resource to clear from persisted storage.
    • persist

      public void persist()
      Persist the values stored in BuildContext(Holder)