| @GenModel(fileExtensions="authorization") |
| @GenModel(modelName="AuthorizationDSL") |
| @GenModel(prefix="AuthorizationDSL") |
| @GenModel(copyrightText="Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License 2.0 |
| which accompanies this distribution, and is available at |
| https://www.eclipse.org/legal/epl-2.0/ |
| |
| SPDX-License-Identifier: EPL-2.0 |
| |
| Contributors: |
| Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| |
| generated from AuthoritarionDSL.xcore |
| |
| ")@GenModel(updateClasspath="false") |
| @Ecore(nsURI="http://osbp.eclipse.org/xtext/authorizationdsl/AuthorizationDSL") |
| @Ecore(nsPrefix="authorizationDSL") |
| @Ecore(rootPackage="authorizationDSL") |
| package org.eclipse.osbp.xtext.authorizationdsl |
| |
| import org.eclipse.emf.ecore.EObject |
| import org.eclipse.emf.ecore.InternalEObject |
| import org.eclipse.osbp.dsl.semantic.common.types.LPackage |
| import org.eclipse.osbp.dsl.semantic.dto.LDto |
| import org.eclipse.osbp.dsl.semantic.dto.LDtoFeature |
| import org.eclipse.osbp.dsl.semantic.entity.LBean |
| import org.eclipse.osbp.dsl.semantic.entity.LBeanFeature |
| import org.eclipse.osbp.dsl.semantic.entity.LEntity |
| import org.eclipse.osbp.dsl.semantic.entity.LEntityFeature |
| import org.eclipse.osbp.xtext.oxtype.resource.EcoreUtil3 |
| import org.eclipse.osbp.xtext.blip.Blip |
| import org.eclipse.osbp.xtext.blip.BlipUserTask |
| import org.eclipse.xtext.xtype.XImportSection |
| |
| class AuthorizationModel { |
| contains XImportSection importSection |
| contains AuthorizationPackage pckg |
| } |
| |
| type InternalEObject wraps InternalEObject |
| |
| class AuthorizationLazyResolver { |
| op EObject eResolveProxy(InternalEObject proxy) { |
| return EcoreUtil3.resolve(proxy, this.eResource().resourceSet); |
| } |
| } |
| |
| class AuthorizationPackage extends LPackage{ |
| contains Role[] roles |
| } |
| |
| class AuthorizationBase extends AuthorizationLazyResolver { |
| String name |
| } |
| |
| |
| class Role extends AuthorizationBase{ |
| contains RoleElement[] roleElements |
| } |
| |
| class RoleElement extends AuthorizationLazyResolver {} |
| |
| class RoleEntity extends RoleElement { |
| RoleEnum[] entityAuthorized |
| contains RoleEntityFeature[] entityFeatures |
| refers LEntity entityRef |
| } |
| |
| class RoleBean extends RoleElement { |
| RoleEnum[] beanAuthorized |
| contains RoleBeanFeature[] beanFeatures |
| refers LBean beanRef |
| } |
| |
| class RoleDto extends RoleElement { |
| RoleEnum[] dtoAuthorized |
| contains RoleDtoFeature[] dtoFeatures |
| refers LDto dtoRef |
| } |
| |
| class RoleBlipAllUserTasks extends RoleElement { |
| RoleBlipUserTaskEnum authorized |
| } |
| |
| class RoleBlipUserTask extends RoleElement { |
| refers BlipUserTask userTask |
| RoleBlipUserTaskEnum authorized |
| } |
| |
| class RoleBlipProcess extends RoleElement { |
| refers Blip process |
| // not necessary, because JBoss only supports one startEvent per process - refers BlipStartEvent startEvent |
| RoleBlipProcessEnum processStartAuthorized |
| contains RoleBlipAllUserTasks allUserTasks |
| contains RoleBlipUserTask[] userTasks |
| } |
| |
| class RoleEntityFeature extends AuthorizationLazyResolver{ |
| refers LEntityFeature entityAttriCol |
| } |
| |
| class RoleEntityAttribute extends RoleEntityFeature{ |
| RolePropertyEnum entityAttriUnauthorized |
| } |
| |
| class RoleEntityReference extends RoleEntityFeature{ |
| RolePropertyEnum entityAttriUnauthorized |
| } |
| |
| class RoleBeanFeature extends AuthorizationLazyResolver{ |
| refers LBeanFeature beanAttriCol |
| } |
| |
| class RoleBeanAttribute extends RoleBeanFeature{ |
| RolePropertyEnum beanAttriUnauthorized |
| } |
| |
| class RoleBeanReference extends RoleBeanFeature{ |
| RolePropertyEnum beanAttriUnauthorized |
| } |
| |
| class RoleDtoFeature extends AuthorizationLazyResolver{ |
| refers LDtoFeature dtoAttriCol |
| } |
| |
| class RoleDtoAttribute extends RoleDtoFeature{ |
| RolePropertyEnum dtoAttriUnauthorized |
| } |
| |
| class RoleDtoReference extends RoleDtoFeature{ |
| RolePropertyEnum dtoAttriUnauthorized |
| } |
| |
| enum RoleEnum{ |
| any as 'ANY' |
| creatable as 'CREATABLE' |
| readable as 'READABLE' |
| updatable as 'UPDATABLE' |
| deletable as 'DELETABLE' |
| } |
| |
| enum RolePropertyEnum{ |
| invisible as 'INVISIBLE' |
| disabled as 'DISABLED' |
| noneditable as 'NONEDITABLE' |
| } |
| |
| enum RoleBlipProcessEnum{ |
| startable as 'STARTABLE' |
| } |
| |
| enum RoleBlipUserTaskEnum{ |
| executable as 'TASKABLE' |
| } |
| |