Class SyncAccessPolicy

java.lang.Object
edu.ucsb.nceas.metacat.dataone.SyncAccessPolicy

public class SyncAccessPolicy extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    isEqual(org.dataone.service.types.v1.AccessPolicy ap1, org.dataone.service.types.v1.AccessPolicy ap2)
    Compare two d1 system metadata access policies for equivalence.
    static void
    main(String[] args)
    Run pid synch script on the given pids Each argument is an individual pid because pids cannot contain whitespace.
    List<org.dataone.service.types.v1.Identifier>
    sync(List<String> guidsToSync)
    Convenience function that accepts a list of guids to sync
    void
    For all guids for which current MN is authoritative, check that access policy is synced with CN.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SyncAccessPolicy

      public SyncAccessPolicy()
  • Method Details

    • sync

      public List<org.dataone.service.types.v1.Identifier> sync(List<String> guidsToSync) throws NumberFormatException, org.dataone.service.exceptions.ServiceFailure, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.NotFound, org.dataone.service.exceptions.NotImplemented, McdbDocNotFoundException, org.dataone.service.exceptions.InvalidRequest, org.dataone.service.exceptions.VersionMismatch, AccessionNumberException, SQLException, Exception
      Convenience function that accepts a list of guids to sync
      Parameters:
      guidsToSync - list of guids to have access policy synced for
      Returns:
      syncedPids - list of pids that were actually synced with the CN
      Throws:
      NumberFormatException
      org.dataone.service.exceptions.ServiceFailure
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.NotAuthorized
      org.dataone.service.exceptions.NotFound
      org.dataone.service.exceptions.NotImplemented
      McdbDocNotFoundException
      org.dataone.service.exceptions.InvalidRequest
      org.dataone.service.exceptions.VersionMismatch
      AccessionNumberException
      SQLException
      Exception
    • syncAll

      public void syncAll() throws org.dataone.service.exceptions.ServiceFailure, org.dataone.service.exceptions.InvalidToken, org.dataone.service.exceptions.NotAuthorized, org.dataone.service.exceptions.NotFound, org.dataone.service.exceptions.NotImplemented, McdbDocNotFoundException, org.dataone.service.exceptions.InvalidRequest, org.dataone.service.exceptions.VersionMismatch, NumberFormatException, AccessionNumberException, SQLException, edu.ucsb.nceas.utilities.PropertyNotFoundException, ServiceException, Exception
      For all guids for which current MN is authoritative, check that access policy is synced with CN.
      Throws:
      org.dataone.service.exceptions.ServiceFailure
      org.dataone.service.exceptions.InvalidToken
      org.dataone.service.exceptions.NotAuthorized
      org.dataone.service.exceptions.NotFound
      org.dataone.service.exceptions.NotImplemented
      McdbDocNotFoundException
      org.dataone.service.exceptions.InvalidRequest
      org.dataone.service.exceptions.VersionMismatch
      NumberFormatException
      AccessionNumberException
      SQLException
      edu.ucsb.nceas.utilities.PropertyNotFoundException
      ServiceException
      Exception
    • isEqual

      public boolean isEqual(org.dataone.service.types.v1.AccessPolicy ap1, org.dataone.service.types.v1.AccessPolicy ap2)
      Compare two d1 system metadata access policies for equivalence.
      Parameters:
      ap1 - - first access policy in the comparison
      ap2 - - second access policy in the comparison
      Returns:
      boolean - true if access policies are equivalent
    • main

      public static void main(String[] args) throws Exception
      Run pid synch script on the given pids Each argument is an individual pid because pids cannot contain whitespace.
      Parameters:
      args -
      Throws:
      Exception