本文整理汇总了Java中org.camunda.bpm.engine.ProcessEngine.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ProcessEngine.getName方法的具体用法?Java ProcessEngine.getName怎么用?Java ProcessEngine.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.camunda.bpm.engine.ProcessEngine
的用法示例。
在下文中一共展示了ProcessEngine.getName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: registerProcessEngine
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
@Override
public void registerProcessEngine(ProcessEngine processEngine) {
ensureNotNull("Cannot register process engine in Jmx Runtime Container", "process engine", processEngine);
String processEngineName = processEngine.getName();
// build and start the service.
JmxManagedProcessEngine managedProcessEngine = new JmxManagedProcessEngine(processEngine);
serviceContainer.startService(ServiceTypes.PROCESS_ENGINE, processEngineName, managedProcessEngine);
}
示例2: setAutoLoginAuthentication
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
/**
* Reads the auto-login-username from the URL parameters and create an
* {@link Authentication} for it containing its groups, tenants and
* authorized apps.
*
* No password check is done here, so you can log onto every user without a
* password. Only makes sense in demo environments!
*/
protected void setAutoLoginAuthentication(final ServletRequest request, Authentications authentications) {
final HttpServletRequest req = (HttpServletRequest) request;
final ProcessEngine engine = getEngine();
// Get the username from the user in SSO
String username = retrieveUsername(req);
// if not set - no auto login
if (username == null) {
return;
}
// if already in the list of logged in users - nothing to do
Authentication authentication = authentications.getAuthenticationForProcessEngine(engine.getName());
if (authentication != null && authentication.getName() == username) {
return;
}
AuthorizationService authorizationService = engine.getAuthorizationService();
// query group information
List<String> groupIds = getGroupsOfUser(engine, username);
List<String> tenantIds = getTenantsOfUser(engine, username);
// check user's app authorizations by iterating of list of apps and ask
// if permitted
HashSet<String> authorizedApps = new HashSet<String>();
authorizedApps.add("admin");
if (engine.getProcessEngineConfiguration().isAuthorizationEnabled()) {
for (String application : APPS) {
if (authorizationService.isUserAuthorized(username, groupIds, ACCESS, APPLICATION, application)) {
authorizedApps.add(application);
}
}
} else {
Collections.addAll(authorizedApps, APPS);
}
// create new authentication object to store authentication
UserAuthentication newAuthentication = new UserAuthentication(username, engine.getName());
newAuthentication.setGroupIds(groupIds);
newAuthentication.setTenantIds(tenantIds);
newAuthentication.setAuthorizedApps(authorizedApps);
// and add the new logged in user
authentications.addAuthentication(newAuthentication);
}
开发者ID:camunda-consulting,项目名称:camunda-webapp-plugins,代码行数:56,代码来源:AutoLoginAuthenticationFilter.java
示例3: HistoricProcessDefinitionRestServiceImpl
import org.camunda.bpm.engine.ProcessEngine; //导入方法依赖的package包/类
public HistoricProcessDefinitionRestServiceImpl(ObjectMapper objectMapper, ProcessEngine processEngine) {
super(processEngine.getName(), objectMapper);
}