Examples of DateAttribute


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

    profile.setId(username);
    MonoTextAttribute fullnameAttr = (MonoTextAttribute) profile.getAttribute("fullname");
    fullnameAttr.setText("nametest surnametest");
    MonoTextAttribute emailAttr = (MonoTextAttribute) profile.getAttribute("email");
    emailAttr.setText(JpUserRegTestHelper.EMAIL);
    DateAttribute dateAttr = (DateAttribute) profile.getAttribute("birthdate");
    dateAttr.setDate(this.getBirthdate(1985, 11, 21));
    MonoTextAttribute languageAttr = (MonoTextAttribute) profile.getAttribute("language");
    languageAttr.setText("en");
    _userRegManager.regAccount(profile);
  }
View Full Code Here

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

    profile.setId(username);
    MonoTextAttribute fullnameAttr = (MonoTextAttribute) profile.getAttribute("fullname");
    fullnameAttr.setText("name surname");
    MonoTextAttribute emailAttr = (MonoTextAttribute) profile.getAttribute("email");
    emailAttr.setText(JpUserRegTestHelper.EMAIL);
    DateAttribute dateAttr = (DateAttribute) profile.getAttribute("birthdate");
    dateAttr.setDate(this.getBirthdate(1985, 11, 21));
    MonoTextAttribute languageAttr = (MonoTextAttribute) profile.getAttribute("language");
    languageAttr.setText("en");
    this._regAccountManager.regAccount(profile);
  }
View Full Code Here

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

  private String getAttributeValue(AttributeInterface attribute, String attributeType) {
    String attributeValue = null;
    if(attributeType != null){
      attributeType = attributeType.trim();
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_DATE.equals(attributeType)){
        DateAttribute dateAttribute = (DateAttribute) attribute;
        attributeValue = dateAttribute.getFormattedDate("dd/MM/yyyy");
      }
      if(JpaddressbookSystemConstants.ATTRIBUTE_TYPE_ENUMERATOR.equals(attributeType)){
        EnumeratorAttribute textAttribute = (EnumeratorAttribute) attribute;
        attributeValue = textAttribute.getText();
      }
View Full Code Here

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

    fullnameAttr.setText(fullname);
   
    MonoTextAttribute emailAttr = (MonoTextAttribute) profile.getAttribute("email");
    emailAttr.setText(email);
   
    DateAttribute birthdateAttr = (DateAttribute) profile.getAttribute("birthdate");
    birthdateAttr.setDate(birthdate);
   
    MonoTextAttribute langAttr = (MonoTextAttribute) profile.getAttribute("language");
    langAttr.setText(lang);
   
    return profile;
View Full Code Here

Examples of com.sun.xacml.attr.DateAttribute

        }
        if (DoubleAttribute.identifier.equals(type)) {
            return new DoubleAttribute(Double.parseDouble(value));
        }
        if (DateAttribute.identifier.equals(type)) {
            return new DateAttribute(DateFormat.getDateInstance().parse(value));
        }
        if (DateTimeAttribute.identifier.equals(type)) {
            return new DateTimeAttribute(DateFormat.getDateInstance().parse(value));
        }
        if (TimeAttribute.identifier.equals(type)) {
View Full Code Here

Examples of com.sun.xacml.attr.DateAttribute

                    set.add(tempDateTimeAttribute);
                } catch (Throwable t) {
                }
            } else if (attributeType.toString()
                    .equals(DateAttribute.identifier)) {
                DateAttribute tempDateAttribute;
                try {
                    tempDateAttribute =
                            DateAttribute.getInstance((String) temp);
                    set.add(tempDateAttribute);
                } catch (Throwable t) {
                }
            } else if (attributeType.toString()
                    .equals(TimeAttribute.identifier)) {
                TimeAttribute tempTimeAttribute;
                try {
                    tempTimeAttribute =
                            TimeAttribute.getInstance((String) temp);
                    set.add(tempTimeAttribute);
                } catch (Throwable t) {
                }
            } else if (attributeType.toString()
                    .equals(IntegerAttribute.identifier)) {
                IntegerAttribute tempIntegerAttribute;
                try {
                    tempIntegerAttribute =
                            IntegerAttribute.getInstance((String) temp);
                    set.add(tempIntegerAttribute);
                } catch (Throwable t) {
                }
            } //xacml fixup
            //was set.add(new StringAttribute((String)temp));
        } else if (temp instanceof String[]) {
            logger.debug("AttributeFinder:findAttribute will return a String[] ", iAm());
            for (int i = 0; i < ((String[]) temp).length; i++) {
                if (((String[]) temp)[i] == null) {
                    continue;
                }
                if (attributeType.toString().equals(StringAttribute.identifier)) {
                    set.add(new StringAttribute(((String[]) temp)[i]));
                } else if (attributeType.toString()
                        .equals(DateTimeAttribute.identifier)) {
                    logger.debug("USING AS DATETIME:{}", ((String[]) temp)[i]);
                    DateTimeAttribute tempDateTimeAttribute;
                    try {
                        tempDateTimeAttribute =
                                DateTimeAttribute
                                        .getInstance(((String[]) temp)[i]);
                        set.add(tempDateTimeAttribute);
                    } catch (Throwable t) {
                    }
                } else if (attributeType.toString()
                        .equals(DateAttribute.identifier)) {
                    logger.debug("USING AS DATE:{}", ((String[]) temp)[i]);
                    DateAttribute tempDateAttribute;
                    try {
                        tempDateAttribute =
                                DateAttribute.getInstance(((String[]) temp)[i]);
                        set.add(tempDateAttribute);
                    } catch (Throwable t) {
View Full Code Here

Examples of com.sun.xacml.attr.DateAttribute

        long millis = dateTimeHelper();

        if (useCachedEnvValues)
            return currentDate;
        else
            return new DateAttribute(new Date(millis));
    }
View Full Code Here

Examples of com.sun.xacml.attr.DateAttribute

        } else {
            // we're caching, so resolve all three values, making sure
            // to use clean copies of the date object since it may be
            // modified when creating the attributes
            currentTime = new TimeAttribute(time);
            currentDate = new DateAttribute(new Date(millis));
            currentDateTime = new DateTimeAttribute(new Date(millis));
        }

        return -1;
    }
View Full Code Here

Examples of com.sun.xacml.attr.DateAttribute

            break;
        }
        case ID_DATE_ADD_YEARMONTHDURATION:
        case ID_DATE_SUBTRACT_YEARMONTHDURATION: {
            DateAttribute date = (DateAttribute) argValues[0];
            YearMonthDurationAttribute duration = (YearMonthDurationAttribute) argValues[1];

            // Decide what sign goes with duration
            int sign = 1;
            if (getFunctionId() == ID_DATE_SUBTRACT_YEARMONTHDURATION)
                sign = -sign;
            if (duration.isNegative())
                sign = -sign;

            // Add (or subtract) the years and months.
            Calendar cal = new GregorianCalendar();
            cal.setTime(date.getValue());
            long years = sign * duration.getYears();
            long months = sign * duration.getMonths();
            if ((years > Integer.MAX_VALUE) || (years < Integer.MIN_VALUE))
                return makeProcessingError("years too large");
            if ((months > Integer.MAX_VALUE) || (months < Integer.MIN_VALUE))
                return makeProcessingError("months too large");

            cal.add(Calendar.YEAR, (int) years);
            cal.add(Calendar.MONTH, (int) months);

            attrResult = new DateAttribute(cal.getTime(), date.getTimeZone(), date
                    .getDefaultedTimeZone());

            break;
        }
        }
View Full Code Here

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

        break;
      case STRING:
        result = new StringAttribute(value == null ? null : value.toString());
        break;
      case DATE:
        result = new DateAttribute((Date) value);
        break;
      case URL:
        result = new UrlAttribute((String) value);
        break;
      case IMGURL:
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.