Class QuotaTypeDeterminer

java.lang.Object
edu.ucsb.nceas.metacat.dataone.quota.QuotaTypeDeterminer

public class QuotaTypeDeterminer extends Object
A class to decide the quota type (storage, portal and etc) based on the given name space
Author:
tao
  • Field Details

  • Constructor Details

    • QuotaTypeDeterminer

      public QuotaTypeDeterminer(List<String> portalNameSpaces) throws org.dataone.service.exceptions.ServiceFailure
      Constructor
      Parameters:
      portalNameSpaces - list of portal objects' name space
      Throws:
      org.dataone.service.exceptions.ServiceFailure
  • Method Details

    • determine

      public void determine(org.dataone.service.types.v2.SystemMetadata sysmeta) throws org.dataone.service.exceptions.InvalidRequest
      Determine the quota type and instance id from the object format information in the system metadata
      Parameters:
      sysmeta - the system metadata associated with the request object
      Throws:
      org.dataone.service.exceptions.InvalidRequest
    • getQuotaType

      public String getQuotaType()
      Get the quota type determined in the determine method
      Returns:
      the string of the quota type
    • getInstanceId

      public String getInstanceId()
      Get the instance id determined in the determine method
      Returns:
      the string of the instance id