• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java CamundaProperties类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties的典型用法代码示例。如果您正苦于以下问题:Java CamundaProperties类的具体用法?Java CamundaProperties怎么用?Java CamundaProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

CamundaProperties类属于org.camunda.bpm.model.bpmn.instance.camunda包,在下文中一共展示了CamundaProperties类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: registerType

点赞 3

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaProperties.class, CAMUNDA_ELEMENT_PROPERTIES)
    .namespaceUri(CAMUNDA_NS)
    .instanceProvider(new ModelTypeInstanceProvider<CamundaProperties>() {
      public CamundaProperties newInstance(ModelTypeInstanceContext instanceContext) {
        return new CamundaPropertiesImpl(instanceContext);
      }
    });

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  camundaPropertyCollection = sequenceBuilder.elementCollection(CamundaProperty.class)
    .build();

  typeBuilder.build();
}
 

开发者ID:camunda,
项目名称:camunda-bpmn-model,
代码行数:17,
代码来源:CamundaPropertiesImpl.java

示例2: readCamundaProperty

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public static Optional<String> readCamundaProperty(BaseElement modelElementInstance, String propertyName) {
  if (modelElementInstance.getExtensionElements() == null) {
    return Optional.empty();
  }
  return modelElementInstance.getExtensionElements().getElementsQuery().filterByType(CamundaProperties.class).list().stream() //
      .map(CamundaProperties::getCamundaProperties) //
      .flatMap(Collection::stream) //
      .filter(property -> property.getCamundaName().equals(propertyName)) //
      .map(CamundaProperty::getCamundaValue) //
      .filter(Objects::nonNull) //
      .findFirst();
}
 

开发者ID:camunda-consulting,
项目名称:camunda-util-demo-data-generator,
代码行数:13,
代码来源:DemoModelInstrumentator.java

示例3: findProperty

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public static Optional<String> findProperty(BpmnModelInstance modelInstance, String propertyName) {
  Collection<CamundaProperties> propertiesList = modelInstance.getModelElementsByType(CamundaProperties.class);
  for (CamundaProperties properties : propertiesList) {
    Collection<CamundaProperty> propertyCollection = properties.getCamundaProperties();
    for (CamundaProperty camundaProperty : propertyCollection) {
      if (propertyName.equals(camundaProperty.getCamundaName())) {
        return Optional.ofNullable(camundaProperty.getCamundaValue());
      }
    }
  }
  return Optional.empty();
}
 

开发者ID:camunda-consulting,
项目名称:camunda-util-demo-data-generator,
代码行数:13,
代码来源:DemoDataGenerator.java

示例4: canStart

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public static boolean canStart(BpmnModelInstance modelInstance, UserDetails user) {
    Collection<StartEvent> startEvents = modelInstance.getModelElementsByType(StartEvent.class);
    eq(startEvents.size(), 1, () -> new BadArgument("wrong number of start events"));

    StartEvent event = startEvents.iterator().next();

    ExtensionElements extensionElements = event.getExtensionElements();
    if (extensionElements != null) {
        List<CamundaProperties> propertiesList = extensionElements.getElementsQuery()
                .filterByType(CamundaProperties.class)
                .list();

        if (propertiesList.size() > 0) {
            CamundaProperties properties = propertiesList.get(0);

            for (CamundaProperty property : properties.getCamundaProperties()) {
                if (property.getCamundaName().equals("authority")) {
                    // if no user specified and authority required, then starting is not allowed
                    if (user == null) {
                        return false;
                    }

                    String authority = property.getCamundaValue();
                    if (!hasAuthority(user, authority)) {
                        return false;
                    }
                }
            }
        }
    }

    return true;
}
 

开发者ID:LIBCAS,
项目名称:ARCLib,
代码行数:34,
代码来源:BpmUtils.java

示例5: testCamundaModelerProperties

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
@Test
public void testCamundaModelerProperties() {
  CamundaProperties camundaProperties = endEvent.getExtensionElements().getElementsQuery().filterByType(CamundaProperties.class).singleResult();
  assertThat(camundaProperties).isNotNull();
  assertThat(camundaProperties.getCamundaProperties()).hasSize(2);

  for (CamundaProperty camundaProperty : camundaProperties.getCamundaProperties()) {
    assertThat(camundaProperty.getCamundaId()).isNull();
    assertThat(camundaProperty.getCamundaName()).startsWith("name");
    assertThat(camundaProperty.getCamundaValue()).startsWith("value");
  }
}
 

开发者ID:camunda,
项目名称:camunda-bpmn-model,
代码行数:13,
代码来源:CamundaExtensionsTest.java

示例6: registerType

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public static void registerType(ModelBuilder modelBuilder) {
  ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaFormField.class, CAMUNDA_ELEMENT_FORM_FIELD)
    .namespaceUri(CAMUNDA_NS)
    .instanceProvider(new ModelTypeInstanceProvider<CamundaFormField>() {
      public CamundaFormField newInstance(ModelTypeInstanceContext instanceContext) {
        return new CamundaFormFieldImpl(instanceContext);
      }
    });

  camundaIdAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_ID)
    .namespace(CAMUNDA_NS)
    .build();

  camundaLabelAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_LABEL)
    .namespace(CAMUNDA_NS)
    .build();

  camundaTypeAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_TYPE)
    .namespace(CAMUNDA_NS)
    .build();

  camundaDatePatternAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DATE_PATTERN)
    .namespace(CAMUNDA_NS)
    .build();

  camundaDefaultValueAttribute = typeBuilder.stringAttribute(CAMUNDA_ATTRIBUTE_DEFAULT_VALUE)
    .namespace(CAMUNDA_NS)
    .build();

  SequenceBuilder sequenceBuilder = typeBuilder.sequence();

  camundaPropertiesChild = sequenceBuilder.element(CamundaProperties.class)
    .build();

  camundaValidationChild = sequenceBuilder.element(CamundaValidation.class)
    .build();

  camundaValueCollection = sequenceBuilder.elementCollection(CamundaValue.class)
    .build();

  typeBuilder.build();
}
 

开发者ID:camunda,
项目名称:camunda-bpmn-model,
代码行数:43,
代码来源:CamundaFormFieldImpl.java

示例7: getCamundaProperties

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public CamundaProperties getCamundaProperties() {
  return camundaPropertiesChild.getChild(this);
}
 

开发者ID:camunda,
项目名称:camunda-bpmn-model,
代码行数:4,
代码来源:CamundaFormFieldImpl.java

示例8: setCamundaProperties

点赞 2

import org.camunda.bpm.model.bpmn.instance.camunda.CamundaProperties; //导入依赖的package包/类
public void setCamundaProperties(CamundaProperties camundaProperties) {
  camundaPropertiesChild.setChild(this, camundaProperties);
}
 

开发者ID:camunda,
项目名称:camunda-bpmn-model,
代码行数:4,
代码来源:CamundaFormFieldImpl.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)