Examples of FeatureNotFoundException


Examples of org.eclipse.emf.ecore.xmi.FeatureNotFoundException

    //
    if (peekObject == null)
    {
      types.push(ERROR_TYPE);
      error
        (new FeatureNotFoundException
          (name,
           null,
           getLocation(),
           getLineNumber(),
           getColumnNumber()));
View Full Code Here

Examples of org.eclipse.emf.ecore.xmi.FeatureNotFoundException

    if (isElement)
    {
      types.push(ERROR_TYPE);
    }
    error
      (new FeatureNotFoundException
        (name,
         peekObject,
         getLocation(),
         getLineNumber(),
         getColumnNumber()));
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

                    .build();
        }
        // Expected Custom FlipStrategy (JSON)
        String uid = formParams.getFirst(POST_PARAMNAME_FEATURE_UID);
        if (!ff4j.getStore().exist(uid)) {
            return Response.status(Response.Status.NOT_FOUND).entity(new FeatureNotFoundException(uid).getMessage()).build();
        }

        // If specific strategy is defined
        boolean flipped = false;
        if (formParams.containsKey(POST_PARAMNAME_FLIPSTRATEGY)) {
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        if (uid == null || uid.isEmpty()) {
            throw new IllegalArgumentException("Feature identifier cannot be null nor empty");
        }
        ClientResponse cRes = getStore().path(uid).get(ClientResponse.class);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
        return parseFeature(cRes.getEntity(String.class));
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        if (uid == null || uid.isEmpty()) {
            throw new IllegalArgumentException("Feature identifier cannot be null nor empty");
        }
        ClientResponse cRes = getStore().path(uid).path(OPERATION_ENABLE).post(ClientResponse.class);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        if (uid == null || uid.isEmpty()) {
            throw new IllegalArgumentException("Feature identifier cannot be null nor empty");
        }
        ClientResponse cRes = storeWebRsc.path(uid).path(OPERATION_DISABLE).post(ClientResponse.class);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        if (uid == null || uid.isEmpty()) {
            throw new IllegalArgumentException("Feature identifier cannot be null nor empty");
        }
        ClientResponse cRes = getStore().path(uid).delete(ClientResponse.class);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot delete feature, an HTTP error " + cRes.getStatus() + " occured.");
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

    public void update(Feature fp) {
        if (fp == null) {
            throw new IllegalArgumentException("Feature cannot be null nor empty");
        }
        if (!exist(fp.getUid())) {
            throw new FeatureNotFoundException(fp.getUid());
        }
        ClientResponse cRes = getStore().path(fp.getUid()).put(ClientResponse.class, fp.toString().getBytes());
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot update feature, an HTTP error " + cRes.getStatus() + " occured.");
        }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        }
        MultivaluedMap<String, String> formData = new MultivaluedMapImpl();
        formData.add(POST_PARAMNAME_ROLENAME, roleName);
        ClientResponse cRes = getStore().path(uid).path(OPERATION_GRANTROLE).post(ClientResponse.class, formData);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot grant role on feature, an HTTP error " + cRes.getStatus() + " occured.");
        }
    }
View Full Code Here

Examples of org.ff4j.exception.FeatureNotFoundException

        }
        MultivaluedMap<String, String> formData = new MultivaluedMapImpl();
        formData.add(POST_PARAMNAME_ROLENAME, roleName);
        ClientResponse cRes = getStore().path(uid).path(OPERATION_REMOVEROLE).post(ClientResponse.class, formData);
        if (Status.NOT_FOUND.getStatusCode() == cRes.getStatus()) {
            throw new FeatureNotFoundException(uid);
        }
        if (Status.NO_CONTENT.getStatusCode() != cRes.getStatus()) {
            throw new FeatureAccessException("Cannot remove role on feature, an HTTP error " + cRes.getStatus() + " occured.");
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.