Tabnine Logo
com.orange.ngsi.model
Code IndexAdd Tabnine to your IDE (free)

How to use com.orange.ngsi.model

Best Java code snippets using com.orange.ngsi.model (Showing top 20 results out of 315)

origin: com.orange.fiware/ngsi-server

Object entity;
if (path.contains("/notifyContext")) {
  entity = new NotifyContextResponse(statusCode);
} else if (path.contains("/updateContextSubscription")) {
  UpdateContextSubscriptionResponse response = new UpdateContextSubscriptionResponse();
  SubscribeError error = new SubscribeError();
  error.setErrorCode(statusCode);
  response.setSubscribeError(error);
  entity = response;
} else if (path.contains("/updateContext")) {
  UpdateContextResponse updateContextResponse = new UpdateContextResponse();
  updateContextResponse.setErrorCode(statusCode);
  entity = updateContextResponse;
} else if (path.contains("/registerContext")) {
  RegisterContextResponse registerContextResponse = new RegisterContextResponse();
  registerContextResponse.setErrorCode(statusCode);
  entity = registerContextResponse;
} else if (path.contains("/subscribeContext")) {
  SubscribeContextResponse subscribeContextResponse = new SubscribeContextResponse();
  SubscribeError error = new SubscribeError();
  error.setErrorCode(statusCode);
  subscribeContextResponse.setSubscribeError(error);
  entity = subscribeContextResponse;
} else if (path.contains("/unsubscribeContext")) {
  UnsubscribeContextResponse unsubscribeContextResponse = new UnsubscribeContextResponse();
  unsubscribeContextResponse.setStatusCode(statusCode);
  entity = unsubscribeContextResponse;
} else if (path.contains("/queryContext")) {
  QueryContextResponse queryContextResponse = new QueryContextResponse();
origin: com.orange.fiware/ngsi-client

@JsonIgnore
public StatusCode(CodeEnum code, String... paramDetail) {
  this.code = code.getLabel();
  this.reasonPhrase = code.getShortPhrase();
  this.detail = String.format(code.getLongPhrase(), paramDetail);
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkUpdateContextSubscription(UpdateContextSubscription updateContextSubscription) throws MissingRequestParameterException {
  if (nullOrEmpty(updateContextSubscription.getSubscriptionId())){
    throw new MissingRequestParameterException("subscriptionId", "String");
  }
  if (updateContextSubscription.getRestriction() != null) {
    if (nullOrEmpty(updateContextSubscription.getRestriction().getAttributeExpression())
        && nullOrEmpty(updateContextSubscription.getRestriction().getScopes())) {
      throw new MissingRequestParameterException("attributeExpression or scopes", "string");
    }
  }
}
origin: com.orange.fiware/ngsi-server

public void checkSubscribeContext(SubscribeContext subscribeContext) throws MissingRequestParameterException {
  if (nullOrEmpty(subscribeContext.getEntityIdList())) {
    throw new MissingRequestParameterException("entities", "List<EntityId>");
  }
  for(EntityId entityId: subscribeContext.getEntityIdList()) {
    checkEntityId(entityId);
  }
  if (nullOrEmpty(subscribeContext.getReference())){
    throw new MissingRequestParameterException("reference", "URI");
  }
  if (subscribeContext.getRestriction() != null) {
    if (nullOrEmpty(subscribeContext.getRestriction().getAttributeExpression())
        && nullOrEmpty(subscribeContext.getRestriction().getScopes())) {
      throw new MissingRequestParameterException("attributeExpression or scopes", "string");
    }
  }
}
origin: com.orange.fiware/ngsi-server

public void checkQueryContext(QueryContext queryContext) throws MissingRequestParameterException {
  if (nullOrEmpty(queryContext.getEntityIdList())) {
    throw new MissingRequestParameterException("entities", "List<EntityId>");
  }
  for(EntityId entityId : queryContext.getEntityIdList()) {
    checkEntityId(entityId);
  }
  if (queryContext.getRestriction() != null) {
    if (nullOrEmpty(queryContext.getRestriction().getAttributeExpression())) {
      throw new MissingRequestParameterException("attributeExpression", "string");
    }
  }
}
public void checkAppendContextElement(AppendContextElement appendContextElement) throws MissingRequestParameterException {
origin: com.orange.fiware/ngsi-server

private void checkContextElementResponse(ContextElementResponse contextElementResponse) throws MissingRequestParameterException {
  if (contextElementResponse.getStatusCode() == null) {
    throw new MissingRequestParameterException("statusCode", "StatusCode");
  }
  if (contextElementResponse.getContextElement() == null) {
    throw new MissingRequestParameterException("contextElement", "ContextElement");
  }
  checkContextElement(contextElementResponse.getContextElement());
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkUpdateContext(UpdateContext updateContext) throws MissingRequestParameterException {
  if (updateContext.getUpdateAction() == null) {
    throw new MissingRequestParameterException("updateAction", "string");
  }
  if (nullOrEmpty(updateContext.getContextElements())) {
    throw new MissingRequestParameterException("contextElements", "List<ContextElement>");
  }
  for (ContextElement contextElement : updateContext.getContextElements()) {
    checkContextElement(contextElement);
  }
}
origin: com.orange.fiware/ngsi-client

/**
 * Send an unsubscription request
 * @param url the URL of the subscription provider
 * @param httpHeaders the HTTP header to use, or null for default
 * @param subscriptionId the subscription ID to unsubscribe
 * @return a future for a UnsubscribeContextResponse
 */
public ListenableFuture<UnsubscribeContextResponse> unsubscribeContext(String url, HttpHeaders httpHeaders, String subscriptionId) {
  return request(url + "/ngsi10/unsubscribeContext", httpHeaders, new UnsubscribeContext(subscriptionId), UnsubscribeContextResponse.class);
}
origin: com.orange.fiware/ngsi-server

public void checkAppendContextElement(AppendContextElement appendContextElement) throws MissingRequestParameterException {
  if (nullOrEmpty(appendContextElement.getAttributeList())) {
    throw new MissingRequestParameterException("contextAttributes", "List<ContextAttribute>");
  }
}
origin: com.orange.fiware/ngsi-server

public void checkUpdateContextElement(UpdateContextElement updateContextElement) throws MissingRequestParameterException {
  if (nullOrEmpty(updateContextElement.getContextAttributes())) {
    throw new MissingRequestParameterException("contextAttributes", "List<ContextAttribute>");
  }
}
origin: com.orange.fiware/ngsi-server

public void checkRegisterContext(RegisterContext registerContext) throws MissingRequestParameterException {
  if (nullOrEmpty(registerContext.getContextRegistrationList()))  {
    throw new MissingRequestParameterException("contextRegistrations", "List<ContextRegistration>");
  }
  for (ContextRegistration contextRegistration : registerContext.getContextRegistrationList()) {
    checkContextRegistration(contextRegistration);
  }
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkUnsubscribeContext(UnsubscribeContext unsubscribeContext) throws MissingRequestParameterException {
  if (nullOrEmpty(unsubscribeContext.getSubscriptionId())){
    throw new MissingRequestParameterException("subscriptionId", "String");
  }
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkSubscribeContext(SubscribeContext subscribeContext) throws MissingRequestParameterException {
  if (nullOrEmpty(subscribeContext.getEntityIdList())) {
    throw new MissingRequestParameterException("entities", "List<EntityId>");
  }
  for(EntityId entityId: subscribeContext.getEntityIdList()) {
    checkEntityId(entityId);
  }
  if (nullOrEmpty(subscribeContext.getReference())){
    throw new MissingRequestParameterException("reference", "URI");
  }
  if (subscribeContext.getRestriction() != null) {
    if (nullOrEmpty(subscribeContext.getRestriction().getAttributeExpression())
        && nullOrEmpty(subscribeContext.getRestriction().getScopes())) {
      throw new MissingRequestParameterException("attributeExpression or scopes", "string");
    }
  }
}
origin: com.orange.fiware/ngsi-server

public void checkUpdateContextSubscription(UpdateContextSubscription updateContextSubscription) throws MissingRequestParameterException {
  if (nullOrEmpty(updateContextSubscription.getSubscriptionId())){
    throw new MissingRequestParameterException("subscriptionId", "String");
  }
  if (updateContextSubscription.getRestriction() != null) {
    if (nullOrEmpty(updateContextSubscription.getRestriction().getAttributeExpression())
        && nullOrEmpty(updateContextSubscription.getRestriction().getScopes())) {
      throw new MissingRequestParameterException("attributeExpression or scopes", "string");
    }
  }
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkQueryContext(QueryContext queryContext) throws MissingRequestParameterException {
  if (nullOrEmpty(queryContext.getEntityIdList())) {
    throw new MissingRequestParameterException("entities", "List<EntityId>");
  }
  for(EntityId entityId : queryContext.getEntityIdList()) {
    checkEntityId(entityId);
  }
  if (queryContext.getRestriction() != null) {
    if (nullOrEmpty(queryContext.getRestriction().getAttributeExpression())) {
      throw new MissingRequestParameterException("attributeExpression", "string");
    }
  }
}
public void checkAppendContextElement(AppendContextElement appendContextElement) throws MissingRequestParameterException {
origin: com.orange.cepheus/cepheus-ngsi

private void checkContextElementResponse(ContextElementResponse contextElementResponse) throws MissingRequestParameterException {
  if (contextElementResponse.getStatusCode() == null) {
    throw new MissingRequestParameterException("statusCode", "StatusCode");
  }
  if (contextElementResponse.getContextElement() == null) {
    throw new MissingRequestParameterException("contextElement", "ContextElement");
  }
  checkContextElement(contextElementResponse.getContextElement());
}
origin: com.orange.fiware/ngsi-server

public void checkUpdateContext(UpdateContext updateContext) throws MissingRequestParameterException {
  if (updateContext.getUpdateAction() == null) {
    throw new MissingRequestParameterException("updateAction", "string");
  }
  if (nullOrEmpty(updateContext.getContextElements())) {
    throw new MissingRequestParameterException("contextElements", "List<ContextElement>");
  }
  for (ContextElement contextElement : updateContext.getContextElements()) {
    checkContextElement(contextElement);
  }
}
origin: com.orange.cepheus/cepheus-ngsi

/**
 * Send an unsubscription request
 * @param url the URL of the subscription provider
 * @param httpHeaders the HTTP header to use, or null for default
 * @param subscriptionId the subscription ID to unsubscribe
 * @return a future for a UnsubscribeContextResponse
 */
public ListenableFuture<UnsubscribeContextResponse> unsubscribeContext(String url, HttpHeaders httpHeaders, String subscriptionId) {
  return request(url + "/ngsi10/unsubscribeContext", httpHeaders, new UnsubscribeContext(subscriptionId), UnsubscribeContextResponse.class);
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkAppendContextElement(AppendContextElement appendContextElement) throws MissingRequestParameterException {
  if (nullOrEmpty(appendContextElement.getAttributeList())) {
    throw new MissingRequestParameterException("contextAttributes", "List<ContextAttribute>");
  }
}
origin: com.orange.cepheus/cepheus-ngsi

public void checkUpdateContextElement(UpdateContextElement updateContextElement) throws MissingRequestParameterException {
  if (nullOrEmpty(updateContextElement.getContextAttributes())) {
    throw new MissingRequestParameterException("contextAttributes", "List<ContextAttribute>");
  }
}
com.orange.ngsi.model

Most used classes

  • UnsubscribeContext
    UnsubcribeContext
  • AppendContextElement
    Request message for POST /contextEntities/{entityID}
  • CodeEnum
    Created by pborscia on 08/07/2015.
  • ContextAttribute
    Context Attribute
  • ContextElement
    Context Entity
  • ContextMetadata,
  • ContextRegistration,
  • ContextRegistrationAttribute,
  • EntityId,
  • NotifyContext,
  • NotifyContextResponse,
  • QueryContext,
  • QueryContextResponse,
  • RegisterContext,
  • RegisterContextResponse,
  • Restriction,
  • StatusCode,
  • SubscribeContext,
  • SubscribeContextResponse
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