Package com.filenet.api.property

Examples of com.filenet.api.property.Property


  }

  @Override
  public void getProperty(String name, List<Value> list)
      throws RepositoryDocumentException {
    Property prop = metas.get(name);
    if (prop == null) {
      logger.log(Level.FINEST, "Property not found: {0}", name);
      return;
    }
    if (prop instanceof PropertyString ||
        prop instanceof PropertyStringList) {
      logger.log(Level.FINEST, "Getting String property: [{0}]", name);
      getPropertyStringValue(name, list);
    } else if (prop instanceof PropertyBinary ||
        prop instanceof PropertyBinaryList) {
      logger.log(Level.FINEST, "Getting Binary property: [{0}]", name);
      getPropertyBinaryValue(name, list);
    } else if (prop instanceof PropertyBoolean ||
        prop instanceof PropertyBooleanList) {
      logger.log(Level.FINEST, "Getting Boolean property: [{0}]", name);
      getPropertyBooleanValue(name, list);
    } else if (prop instanceof PropertyDateTime ||
        prop instanceof PropertyDateTimeList) {
      logger.log(Level.FINEST, "Getting Date property: [{0}]", name);
      getPropertyDateValue(name, list);
    } else if (prop instanceof PropertyFloat64 ||
        prop instanceof PropertyFloat64List) {
      logger.log(Level.FINEST, "Getting Double/Float property: [{0}]", name);
      getPropertyDoubleValue(name, list);
    } else if (prop instanceof PropertyInteger32 ||
        prop instanceof PropertyInteger32List) {
      logger.log(Level.FINEST, "Getting Integer/Long property: [{0}]", name);
      getPropertyLongValue(name, list);
    } else if (prop instanceof PropertyId ||
        prop instanceof PropertyIdList) {
      logger.log(Level.FINEST, "Getting Id property: [{0}]", name);
      getPropertyGuidValue(name, list);
    } else {
      logger.log(Level.FINEST, "Property type for {0} is not determined: ",
          prop.getClass().getName());
    }
  }
View Full Code Here


   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyStringValue(String propertyName,
      List<Value> valuesList) throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyString) {
      String val = prop.getStringValue();
      if (val != null) {
        valuesList.add(Value.getStringValue(val));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyString] contains NULL value", propertyName);
      }
    } else if (prop instanceof PropertyStringList) {
      StringList slist = prop.getStringListValue();
      Iterator iter = slist.iterator();
      while (iter.hasNext()) {
        String val = (String) iter.next();
        if (val != null) {
          valuesList.add(Value.getStringValue(val));
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyGuidValue(String propertyName, List<Value> valuesList)
      throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyId) {
      Id val = prop.getIdValue();
      if (val != null) {
        String id = val.toString();
        valuesList.add(Value.getStringValue(id.substring(1, id.length() - 1)));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyId] contains NULL value", propertyName);
      }
    } else if (prop instanceof PropertyIdList) {
      IdList idList = prop.getIdListValue();
      Iterator iter = idList.iterator();
      while (iter.hasNext()) {
        Id val = (Id) iter.next();
        if (val != null) {
          // Whenever the ID is retrieved from FileNet, it comes with
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyLongValue(String propertyName, List<Value> valuesList)
      throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyInteger32) {
      Integer val = prop.getInteger32Value();
      if (val != null) {
        valuesList.add(Value.getLongValue(val.longValue()));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyInteger32] contains NULL value",
            propertyName);
      }
    } else if (prop instanceof PropertyInteger32List) {
      Integer32List int32List = prop.getInteger32ListValue();
      Iterator iter = int32List.iterator();
      while (iter.hasNext()) {
        Integer val = (Integer) iter.next();
        if (val != null) {
          valuesList.add(Value.getLongValue(val.longValue()));
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyDoubleValue(String propertyName,
      List<Value> valuesList) throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyFloat64) {
      Double val = prop.getFloat64Value();
      if (val != null) {
        valuesList.add(Value.getDoubleValue(val.doubleValue()));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyFloat64] contains NULL value", propertyName);
      }
    } else if (prop instanceof PropertyFloat64List) {
      Float64List float64List = prop.getFloat64ListValue();
      Iterator iter = float64List.iterator();
      while (iter.hasNext()) {
        Double val = (Double) iter.next();
        if (val != null) {
          valuesList.add(Value.getDoubleValue(val.doubleValue()));
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyDateValue(String propertyName, List<Value> valuesList)
      throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyDateTime) {
      Date val = prop.getDateTimeValue();
      if (val != null) {
        Calendar cal = Calendar.getInstance();
        cal.setTime(val);
        valuesList.add(Value.getDateValue(cal));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyDateTime] contains NULL value",
            propertyName);
      }
    } else if (prop instanceof PropertyDateTimeList) {
      DateTimeList dtList = prop.getDateTimeListValue();
      Iterator iter = dtList.iterator();
      while (iter.hasNext()) {
        Date val = (Date) iter.next();
        if (val != null) {
          Calendar cal = Calendar.getInstance();
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyBooleanValue(String propertyName,
      List<Value> valuesList) throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyBoolean) {
      Boolean val = prop.getBooleanValue();
      if (val != null) {
        valuesList.add(Value.getBooleanValue(val.booleanValue()));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyBoolean] contains NULL value", propertyName);
      }
    } else if (prop instanceof PropertyBooleanList) {
      BooleanList booleanList = prop.getBooleanListValue();
      Iterator iter = booleanList.iterator();
      while (iter.hasNext()) {
        Boolean val = (Boolean) iter.next();
        if (val != null) {
          valuesList.add(Value.getBooleanValue(val.booleanValue()));
View Full Code Here

   * multi-valued else it is single-valued.
   */
  @Override
  public void getPropertyBinaryValue(String propertyName,
      List<Value> valuesList) throws RepositoryDocumentException {
    Property prop = metas.get(propertyName);
    if (prop == null) {
      logger.log(Level.FINEST, "{0} property is null", propertyName);
      return;
    }
    if (prop instanceof PropertyBinary) {
      byte[] val = prop.getBinaryValue();
      if (val.length > 0) {
        valuesList.add(Value.getBinaryValue(val));
      } else {
        logger.log(Level.FINEST,
            "{0} property [PropertyBinary] contains NULL value", propertyName);
View Full Code Here

      throws RepositoryDocumentException {
    try {
      Properties props = ((DeletionEvent) this.object).getProperties();
      Iterator it = props.iterator();
      while (it.hasNext()) {
        Property prop = (Property) it.next();
        String propName = prop.getPropertyName();
        if (propName.equalsIgnoreCase(name)) {
          return prop.getDateTimeValue();
        }
      }
    } catch (Exception e) {
      logger.log(Level.WARNING, "Error while trying to get the property "
          + name
View Full Code Here

TOP

Related Classes of com.filenet.api.property.Property

Copyright © 2018 www.massapicom. 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.