Creates a new camunda form field extension element.

@return the builder object
188876
public CamundaUserTaskFormFieldBuilder camundaFormField() {
    CamundaFormData camundaFormData = getCreateSingleExtensionElement(CamundaFormData.class);
    CamundaFormField camundaFormField = createChild(camundaFormData, CamundaFormField.class);
    return new CamundaUserTaskFormFieldBuilder(modelInstance, element, camundaFormField);
  }
1205532
public CmpFieldType<EntityBeanType<T>> getOrCreateCmpField()
   {
      List<Node> nodeList = childNode.get("cmp-field");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new CmpFieldTypeImpl<EntityBeanType<T>>(this, "cmp-field", childNode, nodeList.get(0));
      }
      return createCmpField();
   }
623639
@Override
    public PmdRuleSet create() {
        final SAXBuilder parser = new SAXBuilder();
        final Document dom;
        try {
            dom = parser.build(source);
        } catch (JDOMException | IOException e) {
            if (messages != null) {
                messages.addErrorText(INVALID_INPUT + " : " + e.getMessage());
            }
            LOG.error(INVALID_INPUT, e);
            return new PmdRuleSet();
        }

        final Element eltResultset = dom.getRootElement();
        final Namespace namespace = eltResultset.getNamespace();
        final PmdRuleSet result = new PmdRuleSet();

        final String name = eltResultset.getAttributeValue("name");
        final Element descriptionElement = getChild(eltResultset, namespace);

        result.setName(name);

        if (descriptionElement != null) {
            result.setDescription(descriptionElement.getValue());
        }

        for (Element eltRule : getChildren(eltResultset, "rule", namespace)) {
            PmdRule pmdRule = new PmdRule(eltRule.getAttributeValue("ref"));
            pmdRule.setClazz(eltRule.getAttributeValue("class"));
            pmdRule.setName(eltRule.getAttributeValue("name"));
            pmdRule.setMessage(eltRule.getAttributeValue("message"));
            parsePmdPriority(eltRule, pmdRule, namespace);
            parsePmdProperties(eltRule, pmdRule, namespace);
            result.addRule(pmdRule);
        }
        return result;
    }
100283
private String buildAddForm() {

        StringBuffer result = new StringBuffer(256);

        // only display form if the current user has the "control" right
        if (getEditable()) {
            result.append(dialogSpacer());
            result.append(dialogBlockStart(key(Messages.GUI_PERMISSION_ADD_ACE_0)));

            // get all possible entry types
            ArrayList<String> options = new ArrayList<String>();
            ArrayList<String> optionValues = new ArrayList<String>();
            for (int i = 0; i < (getTypes(false).length - (1 * (isRoleEditable() ? 0 : 1))); i++) {
                options.add(getTypesLocalized()[i]);
                optionValues.add(Integer.toString(i));
            }

            // create the input form for adding an ace
            result.append("<form action=\"").append(getDialogUri()).append(
                "\" method=\"post\" name=\"add\" class=\"nomargin\">\n");
            // set parameters to show correct hidden input fields
            setParamAction(DIALOG_ADDACE);
            setParamType(null);
            setParamName(null);
            result.append(paramsAsHidden());
            result.append("<table border=\"0\" width=\"100%\">\n");
            result.append("<tr>\n");
            result.append("\t<td>").append(
                buildSelect("name=\"" + PARAM_TYPE + "\"", options, optionValues, -1)).append("</td>\n");
            result.append("\t<td class=\"maxwidth\"><input type=\"text\" class=\"maxwidth\" name=\"");
            result.append(PARAM_NAME);
            result.append("\" value=\"\"></td>\n");

            result.append("<td><span style='display: block; height: 1px; width: 10px;'/></td>");

            result.append(
                button(
                    new CmsPrincipalWidget().getButtonJs(PARAM_NAME, "add"),
                    null,
                    "principal",
                    org.opencms.workplace.Messages.GUI_DIALOG_BUTTON_SEARCH_0,
                    getSettings().getUserSettings().getEditorButtonStyle()));

            result.append(
                button(
                    "javascript:document.forms['add'].submit();",
                    null,
                    "new",
                    Messages.GUI_LABEL_ADD_0,
                    getSettings().getUserSettings().getEditorButtonStyle()));

            result.append("</tr>\n");
            result.append("</form>\n");
            result.append("</table>\n");

            result.append(dialogBlockEnd());
        }
        return result.toString();
    }
885212
public Builder toBuilder() {
		return builder()
			.name(_name)
			.cmt(_comment)
			.desc(_description)
			.src(_source)
			.links(_links)
			.number(_number)
			.points(_points);
	}
207905
public B addExtensionElement(BpmnModelElementInstance extensionElement) {
    ExtensionElements extensionElements = getCreateSingleChild(ExtensionElements.class);
    extensionElements.addChildElement(extensionElement);
    return myself;
  }
144470
public static Builder newParserConfigBuilder() {
        return new Builder() {
            boolean used = false;
            CollectionBuilder.Factory listFactory = DEFAULT_LIST_FACTORY;
            CollectionBuilder.Factory vectorFactory = DEFAULT_VECTOR_FACTORY;
            CollectionBuilder.Factory setFactory = DEFAULT_SET_FACTORY;
            CollectionBuilder.Factory mapFactory = DEFAULT_MAP_FACTORY;
            Map<Tag, TagHandler> tagHandlers = defaultTagHandlers();

            public Builder setListFactory(CollectionBuilder.Factory listFactory) {
                checkState();
                this.listFactory = listFactory;
                return this;
            }

            public Builder setVectorFactory(CollectionBuilder.Factory vectorFactory) {
                checkState();
                this.vectorFactory = vectorFactory;
                return this;
            }

            public Builder setSetFactory(CollectionBuilder.Factory setFactory) {
                checkState();
                this.setFactory = setFactory;
                return this;
            }

            public Builder setMapFactory(CollectionBuilder.Factory mapFactory) {
                checkState();
                this.mapFactory = mapFactory;
                return this;
            }

            public Builder putTagHandler(Tag tag, TagHandler handler) {
                checkState();
                this.tagHandlers.put(tag, handler);
                return this;
            }

            public Config build() {
                checkState();
                used = true;
                return new Config() {
                    public Factory getListFactory() {
                        return listFactory;
                    }

                    public Factory getVectorFactory() {
                        return vectorFactory;
                    }

                    public Factory getSetFactory() {
                        return setFactory;
                    }

                    public Factory getMapFactory() {
                        return mapFactory;
                    }

                    public TagHandler getTagHandler(Tag tag) {
                        return tagHandlers.get(tag);
                    }
                };
            }

            private void checkState() {
                if (used) {
                    throw new IllegalStateException(
                            "Builder is single-use. Not usable after build()");
                }
            }
        };
    }
848123
public static Builder newBuilder(String name, LegacySQLTypeName type, Field... subFields) {
    return new Builder().setName(name).setType(type, subFields);
  }
1097305
public static FormInputHandler create() {
		return new FormInputHandler(WebElementFinder.create().noLogging(true), null, null, null, null, null, null, null, null);
	}
472420
public PojoBuilder withCompleteConstructor() {
		pojoCreationCheck();

		// first we need to check if there are any fields to add to constructor
		// because default constructor (without fields) is already present
		Map<String, JFieldVar> nonTransientAndNonStaticFields = getNonTransientAndNonStaticFields();

		// if nonTransientAndNonStaticFields is not empty
		if (!Optional.ofNullable(nonTransientAndNonStaticFields).map(Map::isEmpty).orElse(true)) {
			// Create complete constructor
			JMethod constructor = this.pojo.constructor(JMod.PUBLIC);
			Map<String, JVar> superParametersToAdd = getSuperParametersToAdd(this.pojo);
			addSuperConstructorInvocation(constructor, superParametersToAdd);
			constructor.javadoc().add("Creates a new " + this.pojo.name() + ".");

			Iterator<Map.Entry<String, JFieldVar>> iterator = nonTransientAndNonStaticFields.entrySet().iterator();

			while (iterator.hasNext()) {
				Map.Entry<String, JFieldVar> pair = iterator.next();

				constructor.param(pair.getValue().type(), pair.getKey());
				constructor.body().assign(JExpr._this().ref(pair.getKey()), JExpr.ref(pair.getKey()));
			}
		}

		return this;
	}
48460
public function buildFormFactory()
    {
        $this->ensureCsrfTokenManagerAndTranslatorExist();
        $validator = $this->buildValidator();
        $csrf      = new CsrfExtension(
            $this->csrf_token_manager,
            $this->translator,
            TranslatorBuilder::TRANSLATION_DOMAIN
        );
        $builder   = Forms::createFormFactoryBuilder()->addExtension($csrf)
                                            ->addExtension(new ValidatorExtension($validator))
                                            ->addExtension(new HttpFoundationExtension());
        foreach ($this->form_extensions as $extension) {
            $builder->addExtension($extension);
        }
        return $builder->getFormFactory();
    }
1091198
public static DocumentBuilder createDocumentBuilder()
	{
		try
		{
			DocumentBuilderFactory factory = DOCUMENT_BUILDER_FACTORY.get();

			if (factory == null)
			{
				factory = createDocumentBuilderFactory();

				DOCUMENT_BUILDER_FACTORY = new SoftReference<>(factory);
			}

			return factory.newDocumentBuilder();
		}
		catch (ParserConfigurationException e)
		{
			throw new RuntimeException("Error creating DocumentBuilder: " + e.getMessage(), e);
		}
	}
1055538
private DefaultLocalExtension createExtension(Extension extension)
    {
        DefaultLocalExtension localExtension = new DefaultLocalExtension(this, extension);

        localExtension.setFile(this.storage.getNewExtensionFile(localExtension.getId(), localExtension.getType()));

        return localExtension;
    }
973861
private DocumentBuilder getDocumentBuilderFromPool()
            throws ParserConfigurationException {
        DocumentBuilder builder = documentBuilderPool.pollFirst();
        if (builder == null){
            builder = getDomFactory().newDocumentBuilder();
        }
        builder.setErrorHandler(errorHandler);
        return builder;
    }
328873
public static Builder with(AnnotatedFile f) {
		return new Builder(f.getPath()).formatName(f.getFormatName()).extension(f.getExtension()).mediaType(f.getMediaType()).properties(f.getProperties());
	}
1373840
public static Expression createExpressionForField(FieldExtension fieldExtension) {
        if (StringUtils.isNotEmpty(fieldExtension.getExpression())) {
            ExpressionManager expressionManager = Context.getProcessEngineConfiguration().getExpressionManager();
            return expressionManager.createExpression(fieldExtension.getExpression());
        } else {
            return new FixedValue(fieldExtension.getStringValue());
        }
    }
946374
public static Builder builder() {
    return new AutoValue_OfflineDownloadOptions.Builder()
      .uuid(UUID.randomUUID().getMostSignificantBits())
      .metadata(new byte[] {})
      .progress(0);
    // TODO user must provide a notificationOptions object
  }