本文整理了Java中org.camunda.bpm.engine.authorization.Authorization.getId()
方法的一些代码示例,展示了Authorization.getId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Authorization.getId()
方法的具体详情如下:
包路径:org.camunda.bpm.engine.authorization.Authorization
类名称:Authorization
方法名:getId
暂无
代码示例来源:origin: camunda/camunda-bpm-platform
public void deleteAuthorization() {
Authorization dbAuthorization = getDbAuthorization();
authorizationService.deleteAuthorization(dbAuthorization.getId());
}
代码示例来源:origin: camunda/camunda-bpm-platform
public void tearDown(AuthorizationService authorizationService) {
Set<String> activeAuthorizations = new HashSet<String>();
for (Authorization activeAuthorization : authorizationService.createAuthorizationQuery().list()) {
activeAuthorizations.add(activeAuthorization.getId());
}
for (Authorization createdAuthorization : createdAuthorizations) {
if (activeAuthorizations.contains(createdAuthorization.getId())) {
authorizationService.deleteAuthorization(createdAuthorization.getId());
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Authorization createMockGlobalAuthorization() {
Authorization mockAuthorization = mock(Authorization.class);
when(mockAuthorization.getId()).thenReturn(EXAMPLE_AUTHORIZATION_ID);
when(mockAuthorization.getAuthorizationType()).thenReturn(Authorization.AUTH_TYPE_GLOBAL);
when(mockAuthorization.getUserId()).thenReturn(Authorization.ANY);
when(mockAuthorization.getResourceType()).thenReturn(EXAMPLE_RESOURCE_TYPE_ID);
when(mockAuthorization.getResourceId()).thenReturn(EXAMPLE_RESOURCE_ID);
when(mockAuthorization.getPermissions(Permissions.values())).thenReturn(EXAMPLE_GRANT_PERMISSION_VALUES);
return mockAuthorization;
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static Authorization createMockGrantAuthorization() {
Authorization mockAuthorization = mock(Authorization.class);
when(mockAuthorization.getId()).thenReturn(EXAMPLE_AUTHORIZATION_ID);
when(mockAuthorization.getAuthorizationType()).thenReturn(Authorization.AUTH_TYPE_GRANT);
when(mockAuthorization.getUserId()).thenReturn(EXAMPLE_USER_ID);
when(mockAuthorization.getResourceType()).thenReturn(EXAMPLE_RESOURCE_TYPE_ID);
when(mockAuthorization.getResourceId()).thenReturn(EXAMPLE_RESOURCE_ID);
when(mockAuthorization.getPermissions(Permissions.values())).thenReturn(EXAMPLE_GRANT_PERMISSION_VALUES);
return mockAuthorization;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void deleteManagedAuthorizations() {
for (Authorization authorization : authorizations) {
engineRule.getAuthorizationService().deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public AuthorizationDto createAuthorization(UriInfo context, AuthorizationCreateDto dto) {
final AuthorizationService authorizationService = processEngine.getAuthorizationService();
Authorization newAuthorization = authorizationService.createNewAuthorization(dto.getType());
AuthorizationCreateDto.update(dto, newAuthorization);
newAuthorization = authorizationService.saveAuthorization(newAuthorization);
return getAuthorization(newAuthorization.getId()).getAuthorization(context);
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@After
public void tearDown() {
for (Authorization authorization : authorizations) {
engineRule.getAuthorizationService().deleteAuthorization(authorization.getId());
}
authRule.deleteUsersAndGroups();
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void tearDown() throws Exception {
List<Authorization> list = authorizationService.createAuthorizationQuery().list();
for (Authorization authorization : list) {
authorizationService.deleteAuthorization(authorization.getId());
}
super.tearDown();
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void deleteAuthorizations() {
AuthorizationService authorizationService = engineRule.getAuthorizationService();
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void tearDown() throws Exception {
processEngineConfiguration.setAuthorizationEnabled(false);
List<Authorization> jonnysAuths = authorizationService.createAuthorizationQuery().userIdIn("jonny").list();
for (Authorization authorization : jonnysAuths) {
authorizationService.deleteAuthorization(authorization.getId());
}
super.tearDown();
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static AuthorizationDto fromAuthorization(Authorization dbAuthorization) {
AuthorizationDto authorizationDto = new AuthorizationDto();
authorizationDto.setId(dbAuthorization.getId());
authorizationDto.setType(dbAuthorization.getAuthorizationType());
Permission[] dbPermissions = getPermissions(dbAuthorization);
authorizationDto.setPermissions(PermissionConverter.getNamesForPermissions(dbAuthorization, dbPermissions));
authorizationDto.setUserId(dbAuthorization.getUserId());
authorizationDto.setGroupId(dbAuthorization.getGroupId());
authorizationDto.setResourceType(dbAuthorization.getResourceType());
authorizationDto.setResourceId(dbAuthorization.getResourceId());
return authorizationDto;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
public static AuthorizationDto fromAuthorization(Authorization dbAuthorization) {
AuthorizationDto authorizationDto = new AuthorizationDto();
authorizationDto.setId(dbAuthorization.getId());
authorizationDto.setType(dbAuthorization.getAuthorizationType());
Permission[] dbPermissions = getPermissions(dbAuthorization);
authorizationDto.setPermissions(PermissionConverter.getNamesForPermissions(dbAuthorization, dbPermissions));
authorizationDto.setUserId(dbAuthorization.getUserId());
authorizationDto.setGroupId(dbAuthorization.getGroupId());
authorizationDto.setResourceType(dbAuthorization.getResourceType());
authorizationDto.setResourceId(dbAuthorization.getResourceId());
return authorizationDto;
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (Group group : identityService.createGroupQuery().list()) {
identityService.deleteGroup(group.getId());
}
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
protected void cleanupAfterTest() {
for (Group group : identityService.createGroupQuery().list()) {
identityService.deleteGroup(group.getId());
}
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
}
代码示例来源:origin: camunda/camunda-bpm-platform
@After
public void cleanUp() {
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Group group : identityService.createGroupQuery().list()) {
identityService.deleteGroup(group.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
ClockUtil.reset();
}
代码示例来源:origin: camunda/camunda-bpm-platform
@After
public void cleanUp() {
for (User user : identityService.createUserQuery().list()) {
identityService.deleteUser(user.getId());
}
for (Group group : identityService.createGroupQuery().list()) {
identityService.deleteGroup(group.getId());
}
for (Authorization authorization : authorizationService.createAuthorizationQuery().list()) {
authorizationService.deleteAuthorization(authorization.getId());
}
ClockUtil.reset();
identityService.clearAuthentication();
}
内容来源于网络,如有侵权,请联系作者删除!