Class RepositoryPolicy


  • public final class RepositoryPolicy
    extends java.lang.Object
    A policy controlling access to a repository.
    • Constructor Summary

      Constructors 
      Constructor Description
      RepositoryPolicy()
      Creates a new policy with checksum warnings and daily update checks.
      RepositoryPolicy​(boolean enabled, java.lang.String updatePolicy, java.lang.String checksumPolicy)
      Creates a new policy with the specified settings.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getChecksumPolicy()
      Gets the policy for checksum validation.
      java.lang.String getUpdatePolicy()
      Gets the update policy for locally cached data from the repository.
      int hashCode()  
      boolean isEnabled()
      Indicates whether the associated repository should be contacted or not.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RepositoryPolicy

        public RepositoryPolicy()
        Creates a new policy with checksum warnings and daily update checks.
      • RepositoryPolicy

        public RepositoryPolicy​(boolean enabled,
                                java.lang.String updatePolicy,
                                java.lang.String checksumPolicy)
        Creates a new policy with the specified settings.
        Parameters:
        enabled - A flag whether the associated repository should be accessed or not.
        updatePolicy - The update interval after which locally cached data from the repository is considered stale and should be refetched, may be null.
        checksumPolicy - The way checksum verification should be handled, may be null.
    • Method Detail

      • isEnabled

        public boolean isEnabled()
        Indicates whether the associated repository should be contacted or not.
        Returns:
        true if the repository should be contacted, false otherwise.
      • getUpdatePolicy

        public java.lang.String getUpdatePolicy()
        Gets the update policy for locally cached data from the repository.
        Returns:
        The update policy, never null.
      • getChecksumPolicy

        public java.lang.String getChecksumPolicy()
        Gets the policy for checksum validation.
        Returns:
        The checksum policy, never null.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object