本文整理汇总了Java中org.activiti.engine.impl.context.Context.getLocalizationElementProperties方法的典型用法代码示例。如果您正苦于以下问题:Java Context.getLocalizationElementProperties方法的具体用法?Java Context.getLocalizationElementProperties怎么用?Java Context.getLocalizationElementProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.activiti.engine.impl.context.Context
的用法示例。
在下文中一共展示了Context.getLocalizationElementProperties方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: localize
import org.activiti.engine.impl.context.Context; //导入方法依赖的package包/类
protected void localize(HistoricProcessInstance processInstance, CommandContext commandContext) {
processInstance.setLocalizedName(null);
processInstance.setLocalizedDescription(null);
if (locale != null && processInstance.getProcessDefinitionId() != null) {
ProcessDefinition processDefinition = commandContext.getProcessEngineConfiguration().getDeploymentManager().findDeployedProcessDefinitionById(processInstance.getProcessDefinitionId());
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, processDefinition.getKey(),
processInstance.getProcessDefinitionId(), withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
processInstance.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
processInstance.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
示例2: localize
import org.activiti.engine.impl.context.Context; //导入方法依赖的package包/类
protected void localize(Task task) {
task.setLocalizedName(null);
task.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, task.getTaskDefinitionKey(), processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
task.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
task.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
}
示例3: localize
import org.activiti.engine.impl.context.Context; //导入方法依赖的package包/类
protected void localize(ProcessInstance processInstance) {
ExecutionEntity processInstanceExecution = (ExecutionEntity) processInstance;
processInstanceExecution.setLocalizedName(null);
processInstanceExecution.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = processInstanceExecution.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, processInstanceExecution.getProcessDefinitionKey(), processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
processInstanceExecution.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
processInstanceExecution.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
}
示例4: localize
import org.activiti.engine.impl.context.Context; //导入方法依赖的package包/类
protected void localize(HistoricTaskInstance task) {
task.setLocalizedName(null);
task.setLocalizedDescription(null);
if (locale != null) {
String processDefinitionId = task.getProcessDefinitionId();
if (processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, task.getTaskDefinitionKey(), processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
task.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
task.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}
}
示例5: localize
import org.activiti.engine.impl.context.Context; //导入方法依赖的package包/类
protected void localize(Execution execution, String activityId) {
ExecutionEntity executionEntity = (ExecutionEntity) execution;
executionEntity.setLocalizedName(null);
executionEntity.setLocalizedDescription(null);
String processDefinitionId = executionEntity.getProcessDefinitionId();
if (locale != null && processDefinitionId != null) {
ObjectNode languageNode = Context.getLocalizationElementProperties(locale, activityId, processDefinitionId, withLocalizationFallback);
if (languageNode != null) {
JsonNode languageNameNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_NAME);
if (languageNameNode != null && !languageNameNode.isNull()) {
executionEntity.setLocalizedName(languageNameNode.asText());
}
JsonNode languageDescriptionNode = languageNode.get(DynamicBpmnConstants.LOCALIZATION_DESCRIPTION);
if (languageDescriptionNode != null && !languageDescriptionNode.isNull()) {
executionEntity.setLocalizedDescription(languageDescriptionNode.asText());
}
}
}
}