Examples of BooleanAttribute


Examples of com.agiletec.aps.system.common.entity.model.attribute.BooleanAttribute

    IUserProfile profile = _profileManager.getDefaultProfileType();
    ITextAttribute fullnameAttr = (ITextAttribute) profile.getAttribute("fullname");
    fullnameAttr.setText(nome, null);
    ITextAttribute emailAttr = (ITextAttribute) profile.getAttribute("email");
    emailAttr.setText(email, null);
    BooleanAttribute boolean1 = (BooleanAttribute) profile.getAttribute("boolean1");
    boolean1.setBooleanValue(new Boolean(cat1));
    BooleanAttribute boolean2 = (BooleanAttribute) profile.getAttribute("boolean2");
    boolean2.setBooleanValue(new Boolean(cat2));
    return profile;
  }
View Full Code Here

Examples of com.sun.xacml.attr.BooleanAttribute

        // if it was indeterminate, then that's what we return immediately
        if (result.indeterminate())
            return new MatchResult(MatchResult.INDETERMINATE, result.getStatus());

        // otherwise, we figure out if it was a match
        BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());

        if (bool.getValue())
            return new MatchResult(MatchResult.MATCH);
        else
            return new MatchResult(MatchResult.NO_MATCH);
    }
View Full Code Here

Examples of com.sun.xacml.attr.BooleanAttribute

     * Private helper for any & all functions
     */
    private EvaluationResult anyAndAllHelper(AttributeValue value, BagAttribute bag,
            Function function, EvaluationCtx context, boolean allFunction,
            boolean argumentsAreSwapped) {
        BooleanAttribute attr = BooleanAttribute.getInstance(allFunction);
        Iterator<AttributeValue> it = bag.iterator();

        while (it.hasNext()) {
            List<AttributeValue> params = new ArrayList<AttributeValue>();

            if (!argumentsAreSwapped) {
                params.add(value);
                params.add((AttributeValue) (it.next()));
            } else {
                params.add((AttributeValue) (it.next()));
                params.add(value);
            }

            EvaluationResult result = function.evaluate(params, context);

            if (result.indeterminate())
                return result;

            BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());
            if (bool.getValue() != allFunction) {
                attr = bool;
                break;
            }
        }

View Full Code Here

Examples of com.sun.xacml.attr.BooleanAttribute

            // if it was INDETERMINATE, then that's what we return
            return new Result(Result.DECISION_INDETERMINATE, result.getStatus(), context
                    .getResourceId().encode());
        } else {
            // otherwise we return the effect on tue, and NA on false
            BooleanAttribute bool = (BooleanAttribute) (result.getAttributeValue());

            if (bool.getValue())
                return new Result(effectAttr, context.getResourceId().encode());
            else
                return new Result(Result.DECISION_NOT_APPLICABLE, context.getResourceId().encode());
        }
    }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

  public Attribute<VALUE_TYPE> instantiate() {
    PrimitiveAttribute result;
    Object value = getValue();
    switch (getType()) {
      case BOOLEAN:
        result = new BooleanAttribute((Boolean) value);
        break;
      case SHORT:
        result = new ShortAttribute((Short) value);
        break;
      case INTEGER:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

  }

  private Attribute<?> toPrimitiveDto(Object value, PrimitiveAttributeInfo info) {
    switch (info.getType()) {
      case BOOLEAN:
        return new BooleanAttribute((Boolean) convertToClass(value, Boolean.class));
      case SHORT:
        return new ShortAttribute((Short) convertToClass(value, Short.class));
      case INTEGER:
        return new IntegerAttribute((Integer) convertToClass(value, Integer.class));
      case LONG:
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

    } catch (ParseException e) {
      date = new Date();
    }
    Map<String, PrimitiveAttribute<?>> attributes = new HashMap<String, PrimitiveAttribute<?>>();
    attributes.put(PARAM_TEXT_ATTR, new StringAttribute("manyToOne-1"));
    attributes.put(PARAM_BOOLEAN_ATTR, new BooleanAttribute(true));
    attributes.put(PARAM_INT_ATTR, new IntegerAttribute(100));
    attributes.put(PARAM_FLOAT_ATTR, new FloatAttribute(100.0f));
    attributes.put(PARAM_DOUBLE_ATTR, new DoubleAttribute(100.0));
    attributes.put(PARAM_DATE_ATTR, new DateAttribute(date));
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

  @Autowired
  private DtoConverterService converter;

  @Test
  public void testToObject() throws Exception {
    BooleanAttribute attribute = new BooleanAttribute(true);
    Assert.assertTrue(converter.toInternal(attribute) instanceof Boolean);
    Assert.assertTrue((Boolean) converter.toInternal(attribute));
  }
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

    Map<String, Attribute> attributes = new HashMap<String, Attribute>();
    attributes.put(PARAM_TEXT_ATTR, new StringAttribute("new name"));
    attributes.put(PARAM_INT_ATTR, new IntegerAttribute(5));
    attributes.put(PARAM_FLOAT_ATTR, new FloatAttribute(5.0f));
    attributes.put(PARAM_DOUBLE_ATTR, new DoubleAttribute(5.0));
    attributes.put(PARAM_BOOLEAN_ATTR, new BooleanAttribute(false));
    attributes.put(PARAM_DATE_ATTR, new DateAttribute(date));
    featureModel.setAttributes(feature1, attributes);
    Assert.assertEquals("new name", featureModel.getAttribute(feature1, PARAM_TEXT_ATTR).getValue());
    Assert.assertEquals(5, featureModel.getAttribute(feature1, PARAM_INT_ATTR).getValue());
    Assert.assertEquals(5.0f, featureModel.getAttribute(feature1, PARAM_FLOAT_ATTR).getValue());
View Full Code Here

Examples of org.geomajas.layer.feature.attribute.BooleanAttribute

    attributes.put(PARAM_TEXT_ATTR, new StringAttribute("new name"));
    attributes.put(PARAM_INT_ATTR, new IntegerAttribute(5));
    attributes.put(PARAM_FLOAT_ATTR, new FloatAttribute(5.0f));
    attributes.put(PARAM_DOUBLE_ATTR, new DoubleAttribute(5.0));
    attributes.put(PARAM_BOOLEAN_ATTR, new BooleanAttribute(false));
    attributes.put(PARAM_DATE_ATTR, new DateAttribute(date));
    featureModel.setAttributes(feature1, attributes);
    Assert.assertEquals("new name", featureModel.getAttribute(feature1, PARAM_TEXT_ATTR).getValue());
    Assert.assertEquals(5, featureModel.getAttribute(feature1, PARAM_INT_ATTR).getValue());
    Assert.assertEquals(5.0f, featureModel.getAttribute(feature1, PARAM_FLOAT_ATTR).getValue());
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.