当前位置: 首页>>代码示例>>Java>>正文


Java Context.getLocalizationElementProperties方法代码示例

本文整理汇总了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());
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:23,代码来源:HistoricProcessInstanceQueryImpl.java

示例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());
                }
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:23,代码来源:TaskQueryImpl.java

示例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());
                }
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:24,代码来源:ProcessInstanceQueryImpl.java

示例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());
                }
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:23,代码来源:HistoricTaskInstanceQueryImpl.java

示例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());
            }
        }
    }
}
 
开发者ID:flowable,项目名称:flowable-engine,代码行数:22,代码来源:ExecutionQueryImpl.java


注:本文中的org.activiti.engine.impl.context.Context.getLocalizationElementProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。