diff options
author | Eike Stepper | 2012-06-10 11:56:09 +0000 |
---|---|---|
committer | Eike Stepper | 2012-06-10 11:56:09 +0000 |
commit | d694c1a1eacca90a4789bdae228c979bad8250dc (patch) | |
tree | bde6b42f4f199bce5b41527cb54184ba7ed47931 /plugins/org.eclipse.emf.cdo.security | |
parent | df6fed9b304081a943db6c3ed20e376d5f890548 (diff) | |
download | cdo-d694c1a1eacca90a4789bdae228c979bad8250dc.tar.gz cdo-d694c1a1eacca90a4789bdae228c979bad8250dc.tar.xz cdo-d694c1a1eacca90a4789bdae228c979bad8250dc.zip |
[381472] Design a repository administration API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381472
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.security')
6 files changed, 47 insertions, 47 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security/model/security.ecore b/plugins/org.eclipse.emf.cdo.security/model/security.ecore index 07d568f022..cfcdf31fa8 100644 --- a/plugins/org.eclipse.emf.cdo.security/model/security.ecore +++ b/plugins/org.eclipse.emf.cdo.security/model/security.ecore @@ -52,6 +52,8 @@ eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/> </eClassifiers> <eClassifiers xsi:type="ecore:EClass" name="User" eSuperTypes="#//Assignee"> + <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1" + eType="#//Group" eOpposite="#//Group/users"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="label" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString" changeable="false" volatile="true" transient="true" derived="true"/> <eStructuralFeatures xsi:type="ecore:EAttribute" name="firstName" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/> @@ -64,8 +66,6 @@ <eStructuralFeatures xsi:type="ecore:EAttribute" name="locked" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EBoolean"/> <eStructuralFeatures xsi:type="ecore:EReference" name="password" eType="#//UserPassword" containment="true"/> - <eStructuralFeatures xsi:type="ecore:EReference" name="groups" upperBound="-1" - eType="#//Group" eOpposite="#//Group/users"/> <eStructuralFeatures xsi:type="ecore:EReference" name="allGroups" upperBound="-1" eType="#//Group" changeable="false" volatile="true" transient="true" derived="true"/> <eStructuralFeatures xsi:type="ecore:EReference" name="allRoles" upperBound="-1" diff --git a/plugins/org.eclipse.emf.cdo.security/model/security.genmodel b/plugins/org.eclipse.emf.cdo.security/model/security.genmodel index b852f724df..a426c4dbc1 100644 --- a/plugins/org.eclipse.emf.cdo.security/model/security.genmodel +++ b/plugins/org.eclipse.emf.cdo.security/model/security.genmodel @@ -34,28 +34,23 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//Directory/name"/> </genClasses> <genClasses ecoreClass="security.ecore#//Role"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Role/assignees"/> - <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference security.ecore#//Role/checks"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//Role/id"/> + <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference security.ecore#//Role/checks"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Role/assignees"/> </genClasses> <genClasses image="false" ecoreClass="security.ecore#//Assignee"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Assignee/roles"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//Assignee/id"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Assignee/roles"/> </genClasses> <genClasses ecoreClass="security.ecore#//Group"> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Group/users"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Group/inheritedGroups"/> <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Group/inheritingGroups"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//Group/allInheritedGroups"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//Group/allInheritingGroups"/> <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//Group/allRoles"/> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//Group/users"/> </genClasses> <genClasses ecoreClass="security.ecore#//User"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//User/groups"/> - <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allGroups"/> - <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allRoles"/> - <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allChecks"/> - <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/unassignedRoles"/> <genFeatures property="Readonly" createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//User/label"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//User/firstName"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//User/lastName"/> @@ -64,6 +59,11 @@ <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//User/defaultPermission"/> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//User/locked"/> <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference security.ecore#//User/password"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//User/groups"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allGroups"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allRoles"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/allChecks"/> + <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//User/unassignedRoles"/> </genClasses> <genClasses ecoreClass="security.ecore#//UserPassword"> <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//UserPassword/encrypted"/> @@ -73,10 +73,10 @@ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//Check/permission"/> </genClasses> <genClasses ecoreClass="security.ecore#//ClassCheck"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//ClassCheck/classes"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//ClassCheck/applicableClass"/> </genClasses> <genClasses ecoreClass="security.ecore#//PackageCheck"> - <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//PackageCheck/packages"/> + <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference security.ecore#//PackageCheck/applicablePackage"/> </genClasses> <genClasses ecoreClass="security.ecore#//ResourceCheck"> <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//ResourceCheck/pattern"/> diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityPackage.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityPackage.java index 20f6f0ad31..e129911364 100644 --- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityPackage.java +++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityPackage.java @@ -499,13 +499,22 @@ public interface SecurityPackage extends EPackage int USER__ROLES = ASSIGNEE__ROLES; /** + * The feature id for the '<em><b>Groups</b></em>' reference list. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int USER__GROUPS = ASSIGNEE_FEATURE_COUNT + 0; + + /** * The feature id for the '<em><b>Label</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated * @ordered */ - int USER__LABEL = ASSIGNEE_FEATURE_COUNT + 0; + int USER__LABEL = ASSIGNEE_FEATURE_COUNT + 1; /** * The feature id for the '<em><b>First Name</b></em>' attribute. @@ -514,7 +523,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__FIRST_NAME = ASSIGNEE_FEATURE_COUNT + 1; + int USER__FIRST_NAME = ASSIGNEE_FEATURE_COUNT + 2; /** * The feature id for the '<em><b>Last Name</b></em>' attribute. @@ -523,7 +532,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__LAST_NAME = ASSIGNEE_FEATURE_COUNT + 2; + int USER__LAST_NAME = ASSIGNEE_FEATURE_COUNT + 3; /** * The feature id for the '<em><b>Email</b></em>' attribute. @@ -532,7 +541,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__EMAIL = ASSIGNEE_FEATURE_COUNT + 3; + int USER__EMAIL = ASSIGNEE_FEATURE_COUNT + 4; /** * The feature id for the '<em><b>Default Permission Override</b></em>' attribute. @@ -541,7 +550,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__DEFAULT_PERMISSION_OVERRIDE = ASSIGNEE_FEATURE_COUNT + 4; + int USER__DEFAULT_PERMISSION_OVERRIDE = ASSIGNEE_FEATURE_COUNT + 5; /** * The feature id for the '<em><b>Default Permission</b></em>' attribute. @@ -550,7 +559,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__DEFAULT_PERMISSION = ASSIGNEE_FEATURE_COUNT + 5; + int USER__DEFAULT_PERMISSION = ASSIGNEE_FEATURE_COUNT + 6; /** * The feature id for the '<em><b>Locked</b></em>' attribute. @@ -559,7 +568,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__LOCKED = ASSIGNEE_FEATURE_COUNT + 6; + int USER__LOCKED = ASSIGNEE_FEATURE_COUNT + 7; /** * The feature id for the '<em><b>Password</b></em>' containment reference. @@ -568,16 +577,7 @@ public interface SecurityPackage extends EPackage * @generated * @ordered */ - int USER__PASSWORD = ASSIGNEE_FEATURE_COUNT + 7; - - /** - * The feature id for the '<em><b>Groups</b></em>' reference list. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @generated - * @ordered - */ - int USER__GROUPS = ASSIGNEE_FEATURE_COUNT + 8; + int USER__PASSWORD = ASSIGNEE_FEATURE_COUNT + 8; /** * The feature id for the '<em><b>All Groups</b></em>' reference list. diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/User.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/User.java index f5439d1942..31ef7d0772 100644 --- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/User.java +++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/User.java @@ -20,6 +20,7 @@ import org.eclipse.emf.common.util.EList; * <p> * The following features are supported: * <ul> + * <li>{@link org.eclipse.emf.cdo.security.User#getGroups <em>Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getLabel <em>Label</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getFirstName <em>First Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getLastName <em>Last Name</em>}</li> @@ -28,7 +29,6 @@ import org.eclipse.emf.common.util.EList; * <li>{@link org.eclipse.emf.cdo.security.User#getDefaultPermission <em>Default Permission</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#isLocked <em>Locked</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getPassword <em>Password</em>}</li> - * <li>{@link org.eclipse.emf.cdo.security.User#getGroups <em>Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getAllGroups <em>All Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getAllRoles <em>All Roles</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.User#getAllChecks <em>All Checks</em>}</li> diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/SecurityPackageImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/SecurityPackageImpl.java index 09c0c8cad6..a058a9b788 100644 --- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/SecurityPackageImpl.java +++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/SecurityPackageImpl.java @@ -496,7 +496,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EReference getUser_Groups() { - return (EReference)userEClass.getEStructuralFeatures().get(8); + return (EReference)userEClass.getEStructuralFeatures().get(0); } /** @@ -546,7 +546,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_Label() { - return (EAttribute)userEClass.getEStructuralFeatures().get(0); + return (EAttribute)userEClass.getEStructuralFeatures().get(1); } /** @@ -556,7 +556,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_FirstName() { - return (EAttribute)userEClass.getEStructuralFeatures().get(1); + return (EAttribute)userEClass.getEStructuralFeatures().get(2); } /** @@ -566,7 +566,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_LastName() { - return (EAttribute)userEClass.getEStructuralFeatures().get(2); + return (EAttribute)userEClass.getEStructuralFeatures().get(3); } /** @@ -576,7 +576,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_Email() { - return (EAttribute)userEClass.getEStructuralFeatures().get(3); + return (EAttribute)userEClass.getEStructuralFeatures().get(4); } /** @@ -586,7 +586,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_DefaultPermissionOverride() { - return (EAttribute)userEClass.getEStructuralFeatures().get(4); + return (EAttribute)userEClass.getEStructuralFeatures().get(5); } /** @@ -596,7 +596,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_DefaultPermission() { - return (EAttribute)userEClass.getEStructuralFeatures().get(5); + return (EAttribute)userEClass.getEStructuralFeatures().get(6); } /** @@ -606,7 +606,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EAttribute getUser_Locked() { - return (EAttribute)userEClass.getEStructuralFeatures().get(6); + return (EAttribute)userEClass.getEStructuralFeatures().get(7); } /** @@ -616,7 +616,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage */ public EReference getUser_Password() { - return (EReference)userEClass.getEStructuralFeatures().get(7); + return (EReference)userEClass.getEStructuralFeatures().get(8); } /** @@ -805,6 +805,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage createEReference(groupEClass, GROUP__ALL_ROLES); userEClass = createEClass(USER); + createEReference(userEClass, USER__GROUPS); createEAttribute(userEClass, USER__LABEL); createEAttribute(userEClass, USER__FIRST_NAME); createEAttribute(userEClass, USER__LAST_NAME); @@ -813,7 +814,6 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage createEAttribute(userEClass, USER__DEFAULT_PERMISSION); createEAttribute(userEClass, USER__LOCKED); createEReference(userEClass, USER__PASSWORD); - createEReference(userEClass, USER__GROUPS); createEReference(userEClass, USER__ALL_GROUPS); createEReference(userEClass, USER__ALL_ROLES); createEReference(userEClass, USER__ALL_CHECKS); @@ -1000,6 +1000,11 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage "allRoles", null, 0, -1, Group.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEClass(userEClass, User.class, "User", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$ + initEReference( + getUser_Groups(), + this.getGroup(), + this.getGroup_Users(), + "groups", null, 0, -1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEAttribute( getUser_Label(), theEcorePackage.getEString(), @@ -1034,11 +1039,6 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage null, "password", null, 0, 1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ initEReference( - getUser_Groups(), - this.getGroup(), - this.getGroup_Users(), - "groups", null, 0, -1, User.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ - initEReference( getUser_AllGroups(), this.getGroup(), null, diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/UserImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/UserImpl.java index 77728c2005..79d5292e7c 100644 --- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/UserImpl.java +++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/UserImpl.java @@ -35,6 +35,7 @@ import java.util.Set; * <p> * The following features are implemented: * <ul> + * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getGroups <em>Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getLabel <em>Label</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getFirstName <em>First Name</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getLastName <em>Last Name</em>}</li> @@ -43,7 +44,6 @@ import java.util.Set; * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getDefaultPermission <em>Default Permission</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#isLocked <em>Locked</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getPassword <em>Password</em>}</li> - * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getGroups <em>Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getAllGroups <em>All Groups</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getAllRoles <em>All Roles</em>}</li> * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getAllChecks <em>All Checks</em>}</li> |