org.nuxeo.ecm.core.api.model.Property.get()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(112)

本文整理了Java中org.nuxeo.ecm.core.api.model.Property.get()方法的一些代码示例,展示了Property.get()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Property.get()方法的具体详情如下:
包路径:org.nuxeo.ecm.core.api.model.Property
类名称:Property
方法名:get

Property.get介绍

[英]Get the child property given it's index. This operation is mandatory for List properties.

If this method is not supported an UnsupportedOperationException must be thrown

Relative paths are not resolved. THis method is intended to lookup direct chilren. For path lookups, use Property#resolvePath(String) instead.
[中]获取给定索引的子属性。对于列表属性,此操作是必需的。
如果不支持此方法,则必须抛出UnsupportedOperationException
未解析相对路径。此方法旨在查找直接儿童。对于路径查找,请使用属性#resolvePath(字符串)。

代码示例

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-api

protected void findBlobsProperties(Property property, List<String> split, List<Property> properties) {
  if (split.isEmpty()) {
    if (property.getValue() != null) {
      properties.add(property);
    }
  } else {
    for (Property childProperty : property.getChildren()) {
      Property childSubProp = childProperty.get(split.get(0));
      List<String> subPath = split.subList(1, split.size());
      findBlobsProperties(childSubProp, subPath, properties);
    }
  }
}

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-api

@Override
public Property get(String name) throws PropertyNotFoundException {
  if (fallback != null) {
    return new RemovedProperty(this, name, fallback.get(name));
  } else if (name.matches("\\d+")) {
    return get(Integer.parseInt(name));
  }
  return new RemovedProperty(this, name);
}

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-api

property = property.get(segment);
if (property == null) {
  throw new PropertyNotFoundException(path.toString(), "segment " + segment + " cannot be resolved");
property = property.get(index);

代码示例来源:origin: org.nuxeo.ecm.routing/nuxeo-routing-core

public TaskInfo(GraphNode node, Property p) {
  this.prop = (MapProperty) p;
  this.node = node;
  this.taskDocId = (String) p.get(PROP_TASK_INFO_TASK_DOC_ID).getValue();
  this.status = (String) p.get(PROP_TASK_INFO_STATUS).getValue();
  this.actor = (String) p.get(PROP_TASK_INFO_ACTOR).getValue();
  this.comment = (String) p.get(PROP_TASK_INFO_COMMENT).getValue();
  Property ended = prop.get(PROP_TASK_INFO_ENDED);
  if (ended != null) {
    this.ended = BooleanUtils.isTrue(ended.getValue(Boolean.class));
  }
}

代码示例来源:origin: org.nuxeo.ecm.core/nuxeo-core-io

GenericRecord record = new GenericData.Record(schema);
for (Field f : schema.getFields()) {
  record.put(f.name(), service.toAvro(f.schema(), input.get(service.decodeName(f.name()))));

代码示例来源:origin: org.nuxeo.ecm.routing/nuxeo-routing-core

public EscalationRule(GraphNode node, Property p) {
  this.prop = (MapProperty) p;
  this.node = node;
  this.id = (String) p.get(PROP_ESCALATION_RULE_ID).getValue();
  this.label = (String) p.get(PROP_ESCALATION_RULE_LABEL).getValue();
  Property multipleEvaluationProp = prop.get(PROP_ESCALATION_RULE_MULTIPLE_EXECUTION);
  if (multipleEvaluationProp != null) {
    multipleExecution = BooleanUtils.isTrue(multipleEvaluationProp.getValue(Boolean.class));
  }
  this.condition = (String) p.get(PROP_ESCALATION_RULE_CONDITION).getValue();
  Property evaluatedProp = prop.get(PROP_ESCALATION_RULE_EXECUTED);
  if (evaluatedProp != null) {
    executed = BooleanUtils.isTrue(evaluatedProp.getValue(Boolean.class));
  }
  this.chain = (String) p.get(PROP_ESCALATION_RULE_CHAIN).getValue();
  this.lastExcutionTime = (Calendar) p.get(PROP_LAST_EXECUTION_TIME).getValue();
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-rendering

@Override
public TemplateModel get(String name) throws TemplateModelException {
  try {
    Property p = property.get(name);
    return wrap(p);
  } catch (PropertyException e) {
    throw new TemplateModelException(e);
  }
}

代码示例来源:origin: org.nuxeo.ecm.routing/nuxeo-routing-core

protected List<Point> computePath() {
    ListProperty props = (ListProperty) prop.get(PROP_TRANS_PATH);
    List<Point> points = new ArrayList<>(props.size());
    for (Property p : props) {
      points.add(new Point(
        (Double) p.get("x").getValue(),
        (Double) p.get("y").getValue()));
    }
    return points;
  }
}

代码示例来源:origin: org.nuxeo.ecm.platform/nuxeo-platform-imaging-api

@Override
public String getViewXPath(String viewName) {
  Property views = doc.getProperty(VIEWS_PROPERTY);
  for (int i = 0; i < views.size(); i++) {
    if (views.get(i).getValue(TITLE_PROPERTY).equals(viewName)) {
      return getViewXPathFor(i);
    }
  }
  return null;
}

代码示例来源:origin: org.nuxeo.ecm.routing/nuxeo-routing-core

@Override
public void removeTaskInfo(String taskId) {
  ListProperty props = (ListProperty) document.getProperty(PROP_TASKS_INFO);
  Property propertytoBeRemoved = null;
  for (Property p : props) {
    if (taskId.equals(p.get(PROP_TASK_INFO_TASK_DOC_ID).getValue())) {
      propertytoBeRemoved = p;
      break;
    }
  }
  if (propertytoBeRemoved != null) {
    props.remove(propertytoBeRemoved);
    saveDocument();
    tasksInfo = null;
  }
}

代码示例来源:origin: opentoutatice-ecm.platform/opentoutatice-ecm-platform-web

if (property.get("title").getValue().equals(title)) {
  view = property;
  if (property.get("title").getValue().equals("Thumbnail")) {
    view = property;

相关文章