congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
SignatureManager.getAvailableSignatureFiles
Code IndexAdd Tabnine to your IDE (free)

How to use
getAvailableSignatureFiles
method
in
uk.gov.nationalarchives.droid.core.interfaces.signature.SignatureManager

Best Java code snippets using uk.gov.nationalarchives.droid.core.interfaces.signature.SignatureManager.getAvailableSignatureFiles (Showing top 4 results out of 315)

origin: uk.gov.nationalarchives/droid-ui

/**
 * 
 * @return a map of available signature files.
 */
public Map<SignatureType, SortedMap<String, SignatureFileInfo>> list() {
  return signatureManager.getAvailableSignatureFiles();
}
 
origin: digital-preservation/droid

/**
 * 
 * @return a map of available signature files.
 */
public Map<SignatureType, SortedMap<String, SignatureFileInfo>> list() {
  return signatureManager.getAvailableSignatureFiles();
}
 
origin: digital-preservation/droid

/**
 * {@inheritDoc}
 */
@Override
public void execute() {
  Map<SignatureType, SortedMap<String, SignatureFileInfo>> sigFiles = 
    signatureManager.getAvailableSignatureFiles();
  if (sigFiles.isEmpty()) {
    printWriter.println(I18N.getResource(I18N.NO_SIG_FILES_AVAILABLE));
  } else {
    for (SortedMap<String, SignatureFileInfo> sigFilesForType : sigFiles.values()) {
      for (SignatureFileInfo info : sigFilesForType.values()) {
        printWriter.println(I18N.getResource(I18N.DEFAULT_SIGNATURE_VERSION,
            info.getType(), info.getVersion(), info.getFile().getFileName().toString()));
      }
    }
  }
  
}
 
origin: digital-preservation/droid

/**
 * 
 * {@inheritDoc}
 */
@Override
public void execute() throws CommandExecutionException {
  
  boolean validVersion = false;
  Map<SignatureType, SortedMap<String, SignatureFileInfo>> sigFileInfos = 
    signatureManager.getAvailableSignatureFiles();
  
  Map<String, SignatureFileInfo> sigFileInfoForType = sigFileInfos.get(type);
  
  for (Map.Entry<String, SignatureFileInfo> entry : sigFileInfoForType.entrySet()) {
    String key = entry.getKey();
    SignatureFileInfo info = entry.getValue();
    if (info.getVersion() == signatureFileVersion) {
      validVersion = true;
      updateDefaultVersion(key);
      break;
    }
  }
  if (!validVersion) {
    throw new CommandExecutionException(I18N.getResource(
        I18N.CONFIGURE_SIGNATURE_FILE_VERSION_INVALID,
        signatureFileVersion));
  }
}
uk.gov.nationalarchives.droid.core.interfaces.signatureSignatureManagergetAvailableSignatureFiles

Popular methods of SignatureManager

  • downloadLatest
    Downloads the latest file to local disk.
  • getDefaultSignatures
  • getLatestSignatureFiles
    Returns a signature file info if a later version is available, otherwise returns null if we already
  • install
    Installs a signature file in DROID.

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • findViewById (Activity)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now