Tabnine Logo
RestOperationTypeEnum.getCode
Code IndexAdd Tabnine to your IDE (free)

How to use
getCode
method
in
ca.uhn.fhir.rest.api.RestOperationTypeEnum

Best Java code snippets using ca.uhn.fhir.rest.api.RestOperationTypeEnum.getCode (Showing top 20 results out of 315)

origin: jamesagnew/hapi-fhir

private void checkBindingForSystemOps(ConformanceRestComponent rest, Set<SystemRestfulInteraction> systemOps, BaseMethodBinding<?> nextMethodBinding) {
  if (nextMethodBinding.getRestOperationType() != null) {
    String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
    if (sysOpCode != null) {
      SystemRestfulInteraction sysOp;
      try {
        sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
      } catch (FHIRException e) {
        return;
      }
      if (sysOp == null) {
        return;
      }
      if (systemOps.contains(sysOp) == false) {
        systemOps.add(sysOp);
        rest.addInteraction().setCode(sysOp);
      }
    }
  }
}
origin: jamesagnew/hapi-fhir

private void checkBindingForSystemOps(ConformanceRestComponent rest, Set<SystemRestfulInteraction> systemOps,
  BaseMethodBinding<?> nextMethodBinding) {
 if (nextMethodBinding.getRestOperationType() != null) {
  String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
  if (sysOpCode != null) {
   SystemRestfulInteraction sysOp;
   try {
    sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
   } catch (Exception e) {
    sysOp = null;
   }
   if (sysOp == null) {
    return;
   }
   if (systemOps.contains(sysOp) == false) {
    systemOps.add(sysOp);
    rest.addInteraction().setCode(sysOp);
   }
  }
 }
}
origin: jamesagnew/hapi-fhir

private void checkBindingForSystemOps(CapabilityStatementRestComponent rest, Set<SystemRestfulInteraction> systemOps, BaseMethodBinding<?> nextMethodBinding) {
 if (nextMethodBinding.getRestOperationType() != null) {
  String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
  if (sysOpCode != null) {
   SystemRestfulInteraction sysOp;
   try {
    sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
   } catch (FHIRException e) {
    return;
   }
   if (sysOp == null) {
    return;
   }
   if (systemOps.contains(sysOp) == false) {
    systemOps.add(sysOp);
    rest.addInteraction().setCode(sysOp);
   }
  }
 }
}
origin: jamesagnew/hapi-fhir

return myRequestDetails.getRestOperationType().getCode();
origin: jamesagnew/hapi-fhir

private void verifyStatusOk(RestOperationTypeEnum theOperation, IBaseResource theOldResourceOrNull, IBaseResource theResource) {
  Subscription subscription = (Subscription) theResource;
  SubscriptionStatusEnum newStatus = subscription.getStatusElement().getValueAsEnum();
  if (newStatus == SubscriptionStatusEnum.REQUESTED || newStatus == SubscriptionStatusEnum.OFF) {
    return;
  }
  if (newStatus == null) {
    String actualCode = subscription.getStatusElement().getValueAsString();
    throw new UnprocessableEntityException("Can not " + theOperation.getCode() + " resource: Subscription.status must be populated on this server" + ((isNotBlank(actualCode)) ? " (invalid value " + actualCode + ")" : ""));
  }
  if (theOldResourceOrNull != null) {
    try {
      Subscription existing = (Subscription) theOldResourceOrNull;
      SubscriptionStatusEnum existingStatus = existing.getStatusElement().getValueAsEnum();
      if (existingStatus != newStatus) {
        verifyActiveStatus(theOperation, subscription, newStatus, existingStatus);
      }
    } catch (ResourceNotFoundException e) {
      verifyActiveStatus(theOperation, subscription, newStatus, null);
    }
  } else {
    verifyActiveStatus(theOperation, subscription, newStatus, null);
  }
}
origin: jamesagnew/hapi-fhir

private void verifyStatusOk(RestOperationTypeEnum theOperation, IBaseResource theOldResourceOrNull, IBaseResource theResource) {
  Subscription subscription = (Subscription) theResource;
  SubscriptionStatus newStatus = subscription.getStatusElement().getValue();
  if (newStatus == SubscriptionStatus.REQUESTED || newStatus == SubscriptionStatus.OFF) {
    return;
  }
  if (newStatus == null) {
    String actualCode = subscription.getStatusElement().getValueAsString();
    throw new UnprocessableEntityException("Can not " + theOperation.getCode() + " resource: Subscription.status must be populated on this server" + ((isNotBlank(actualCode)) ? " (invalid value " + actualCode + ")" : ""));
  }
  if (theOldResourceOrNull != null) {
    try {
      Subscription existing = (Subscription) theOldResourceOrNull;
      SubscriptionStatus existingStatus = existing.getStatusElement().getValue();
      if (existingStatus != newStatus) {
        verifyActiveStatus(theOperation, subscription, newStatus, existingStatus);
      }
    } catch (ResourceNotFoundException e) {
      verifyActiveStatus(theOperation, subscription, newStatus, null);
    }
  } else {
    verifyActiveStatus(theOperation, subscription, newStatus, null);
  }
}
origin: jamesagnew/hapi-fhir

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatusEnum newStatus, SubscriptionStatusEnum theExistingStatus) {
  SubscriptionChannelTypeEnum channelType = theSubscription.getChannel().getTypeElement().getValueAsEnum();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelTypeEnum.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatusEnum.OFF.getCode() + "' or '" + SubscriptionStatusEnum.REQUESTED.getCode() + "' on a newly created subscription");
}
origin: jamesagnew/hapi-fhir

private void verifyStatusOk(RestOperationTypeEnum theOperation, IBaseResource theOldResourceOrNull, IBaseResource theResource) {
  Subscription subscription = (Subscription) theResource;
  SubscriptionStatus newStatus = subscription.getStatusElement().getValue();
  if (newStatus == SubscriptionStatus.REQUESTED || newStatus == SubscriptionStatus.OFF) {
    return;
  }
  if (newStatus == null) {
    String actualCode = subscription.getStatusElement().getValueAsString();
    throw new UnprocessableEntityException("Can not " + theOperation.getCode() + " resource: Subscription.status must be populated on this server" + ((isNotBlank(actualCode)) ? " (invalid value " + actualCode + ")" : ""));
  }
  if (theOldResourceOrNull != null) {
    try {
      Subscription existing = (Subscription) theOldResourceOrNull;
      SubscriptionStatus existingStatus = existing.getStatusElement().getValue();
      if (existingStatus != newStatus) {
        verifyActiveStatus(theOperation, subscription, newStatus, existingStatus);
      }
    } catch (ResourceNotFoundException e) {
      verifyActiveStatus(theOperation, subscription, newStatus, null);
    }
  } else {
    verifyActiveStatus(theOperation, subscription, newStatus, null);
  }
}
origin: jamesagnew/hapi-fhir

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatus newStatus, SubscriptionStatus theExistingStatus) {
  SubscriptionChannelType channelType = theSubscription.getChannel().getTypeElement().getValue();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelType.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatus.OFF.toCode() + "' or '" + SubscriptionStatus.REQUESTED.toCode() + "' on a newly created subscription");
}
origin: jamesagnew/hapi-fhir

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatus newStatus, SubscriptionStatus theExistingStatus) {
  SubscriptionChannelType channelType = theSubscription.getChannel().getTypeElement().getValue();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelType.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatus.OFF.toCode() + "' or '" + SubscriptionStatus.REQUESTED.toCode() + "' on a newly created subscription");
}
origin: jamesagnew/hapi-fhir

String resOpCode = nextMethodBinding.getRestOperationType().getCode();
if (resOpCode != null) {
 TypeRestfulInteraction resOp;
origin: jamesagnew/hapi-fhir

String resOpCode = nextMethodBinding.getRestOperationType().getCode();
if (resOpCode != null) {
  TypeRestfulInteraction resOp;
origin: jamesagnew/hapi-fhir

String resOpCode = nextMethodBinding.getRestOperationType().getCode();
if (resOpCode != null) {
 TypeRestfulInteraction resOp;
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu2

private void checkBindingForSystemOps(Rest rest, Set<SystemRestfulInteractionEnum> systemOps, BaseMethodBinding<?> nextMethodBinding) {
  if (nextMethodBinding.getRestOperationType() != null) {
    String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
    if (sysOpCode != null) {
      SystemRestfulInteractionEnum sysOp = SystemRestfulInteractionEnum.VALUESET_BINDER.fromCodeString(sysOpCode);
      if (sysOp == null) {
        return;
      }
      if (systemOps.contains(sysOp) == false) {
        systemOps.add(sysOp);
        rest.addInteraction().setCode(sysOp);
      }
    }
  }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3

private void checkBindingForSystemOps(CapabilityStatementRestComponent rest, Set<SystemRestfulInteraction> systemOps, BaseMethodBinding<?> nextMethodBinding) {
 if (nextMethodBinding.getRestOperationType() != null) {
  String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
  if (sysOpCode != null) {
   SystemRestfulInteraction sysOp;
   try {
    sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
   } catch (FHIRException e) {
    return;
   }
   if (sysOp == null) {
    return;
   }
   if (systemOps.contains(sysOp) == false) {
    systemOps.add(sysOp);
    rest.addInteraction().setCode(sysOp);
   }
  }
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-hl7org-dstu2

private void checkBindingForSystemOps(ConformanceRestComponent rest, Set<SystemRestfulInteraction> systemOps,
  BaseMethodBinding<?> nextMethodBinding) {
 if (nextMethodBinding.getRestOperationType() != null) {
  String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
  if (sysOpCode != null) {
   SystemRestfulInteraction sysOp;
   try {
    sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
   } catch (Exception e) {
    sysOp = null;
   }
   if (sysOp == null) {
    return;
   }
   if (systemOps.contains(sysOp) == false) {
    systemOps.add(sysOp);
    rest.addInteraction().setCode(sysOp);
   }
  }
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-structures-r4

private void checkBindingForSystemOps(CapabilityStatementRestComponent rest, Set<SystemRestfulInteraction> systemOps, BaseMethodBinding<?> nextMethodBinding) {
 if (nextMethodBinding.getRestOperationType() != null) {
  String sysOpCode = nextMethodBinding.getRestOperationType().getCode();
  if (sysOpCode != null) {
   SystemRestfulInteraction sysOp;
   try {
    sysOp = SystemRestfulInteraction.fromCode(sysOpCode);
   } catch (FHIRException e) {
    return;
   }
   if (sysOp == null) {
    return;
   }
   if (systemOps.contains(sysOp) == false) {
    systemOps.add(sysOp);
    rest.addInteraction().setCode(sysOp);
   }
  }
 }
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatusEnum newStatus, SubscriptionStatusEnum theExistingStatus) {
  SubscriptionChannelTypeEnum channelType = theSubscription.getChannel().getTypeElement().getValueAsEnum();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelTypeEnum.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatusEnum.OFF.getCode() + "' or '" + SubscriptionStatusEnum.REQUESTED.getCode() + "' on a newly created subscription");
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatus newStatus, SubscriptionStatus theExistingStatus) {
  SubscriptionChannelType channelType = theSubscription.getChannel().getTypeElement().getValue();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelType.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatus.OFF.toCode() + "' or '" + SubscriptionStatus.REQUESTED.toCode() + "' on a newly created subscription");
}
origin: ca.uhn.hapi.fhir/hapi-fhir-jpaserver-base

private void verifyActiveStatus(RestOperationTypeEnum theOperation, Subscription theSubscription, SubscriptionStatus newStatus, SubscriptionStatus theExistingStatus) {
  SubscriptionChannelType channelType = theSubscription.getChannel().getTypeElement().getValue();
  if (channelType == null) {
    throw new UnprocessableEntityException("Subscription.channel.type must be populated");
  }
  if (channelType == SubscriptionChannelType.WEBSOCKET) {
    return;
  }
  if (theExistingStatus != null) {
    throw new UnprocessableEntityException("Subscription.status can not be changed from " + describeStatus(theExistingStatus) + " to " + describeStatus(newStatus));
  }
  if (theSubscription.getStatus() == null) {
    throw new UnprocessableEntityException("Can not " + theOperation.getCode().toLowerCase() + " resource: Subscription.status must be populated on this server");
  }
  throw new UnprocessableEntityException("Subscription.status must be '" + SubscriptionStatus.OFF.toCode() + "' or '" + SubscriptionStatus.REQUESTED.toCode() + "' on a newly created subscription");
}
ca.uhn.fhir.rest.apiRestOperationTypeEnumgetCode

Javadoc

Returns the code associated with this enumerated value

Popular methods of RestOperationTypeEnum

    Popular in Java

    • Updating database using SQL prepared statement
    • getExternalFilesDir (Context)
    • onRequestPermissionsResult (Fragment)
    • setRequestProperty (URLConnection)
    • BufferedImage (java.awt.image)
      The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
    • File (java.io)
      An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
    • UnknownHostException (java.net)
      Thrown when a hostname can not be resolved.
    • MessageFormat (java.text)
      Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
    • Callable (java.util.concurrent)
      A task that returns a result and may throw an exception. Implementors define a single method with no
    • AtomicInteger (java.util.concurrent.atomic)
      An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
    • Top 12 Jupyter Notebook extensions
    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