Class CommonUtil


  • public class CommonUtil
    extends java.lang.Object
    Common Util captures common methods
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CommonUtil.Type
      Type of Operation Call
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static FHIROperationException buildExceptionWithIssue​(java.lang.String msg, java.lang.Throwable cause, IssueType issueType)
      Construct a FHIROperationException with the passed msg, caused by (@code cause}, and a single OperationOutcome.Issue of type issueType
      static FHIROperationException buildExceptionWithIssue​(java.lang.String msg, IssueType issueType)
      Construct a FHIROperationException with the passed msg and a single OperationOutcome.Issue of type issueType
      void checkAllowed​(FHIROperationContext operationContext, boolean isImport)  
      void checkEnabled()
      checks that bulkdata operation is enabled
      static java.lang.String decodeJobId​(java.lang.String encodedJobId)
      decode the job id back into the string representation of its numeric job id
      static java.lang.String encodeJobId​(long jobId)
      encode the job id as a short string for use in URLs
      void verifyAllowedType​(java.lang.String storageType)
      checks the storage type is allowed.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommonUtil

        public CommonUtil​(CommonUtil.Type opType)
        Parameters:
        type - the type of the Export
    • Method Detail

      • encodeJobId

        public static java.lang.String encodeJobId​(long jobId)
        encode the job id as a short string for use in URLs
        Parameters:
        jobId - the numeric job id to encode
        Returns:
      • decodeJobId

        public static java.lang.String decodeJobId​(java.lang.String encodedJobId)
        decode the job id back into the string representation of its numeric job id
        Parameters:
        encodedJobId - a job id encoded via #encodeJobId(long, String, String)
        Returns:
        Throws:
        java.lang.IllegalArgumentException - if the passed encodedJobId could not be decoded
      • buildExceptionWithIssue

        public static FHIROperationException buildExceptionWithIssue​(java.lang.String msg,
                                                                     IssueType issueType)
        Construct a FHIROperationException with the passed msg and a single OperationOutcome.Issue of type issueType
        Parameters:
        msg -
        issueType -
        Returns:
        Throws:
        FHIROperationException
      • buildExceptionWithIssue

        public static FHIROperationException buildExceptionWithIssue​(java.lang.String msg,
                                                                     java.lang.Throwable cause,
                                                                     IssueType issueType)
        Construct a FHIROperationException with the passed msg, caused by (@code cause}, and a single OperationOutcome.Issue of type issueType
        Parameters:
        msg -
        cause -
        issueType -
        Returns:
        Throws:
        FHIROperationException