Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-06-10 11:46:52 +0000
committerEike Stepper2012-06-10 11:46:52 +0000
commitdf6fed9b304081a943db6c3ed20e376d5f890548 (patch)
treeb40ed51124b524bf33c072d4a4bb8026b854ea16
parent18397e5d7cee96d44b4972fe6f032b589a323a38 (diff)
downloadcdo-df6fed9b304081a943db6c3ed20e376d5f890548.tar.gz
cdo-df6fed9b304081a943db6c3ed20e376d5f890548.tar.xz
cdo-df6fed9b304081a943db6c3ed20e376d5f890548.zip
[380629] Design a default Security model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=380629
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/plugin.properties2
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/AssigneeItemProvider.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java30
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/DirectoryItemProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/GroupItemProvider.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserPasswordItemProvider.java26
-rw-r--r--plugins/org.eclipse.emf.cdo.security/model/security.ecore40
-rw-r--r--plugins/org.eclipse.emf.cdo.security/model/security.genmodel2
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Assignee.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Group.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java25
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Role.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityPackage.java140
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/User.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/AssigneeImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/GroupImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java29
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RealmImpl.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RoleImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/SecurityPackageImpl.java166
-rw-r--r--plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/UserImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java21
-rw-r--r--plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java9
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java161
30 files changed, 409 insertions, 388 deletions
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
index f1703a7476..4257a64811 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
@@ -86,3 +86,5 @@ _UI_Realm_defaultPermission_feature = Default Permission
_UI_User_defaultPermissionOverride_feature = Default Permission Override
_UI_User_defaultPermission_feature = Default Permission
_UI_User_allChecks_feature = All Checks
+_UI_ClassCheck_applicableClass_feature = Applicable Class
+_UI_PackageCheck_applicablePackage_feature = Applicable Package
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/AssigneeItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/AssigneeItemProvider.java
index 194ee7fc5c..fdd0837fad 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/AssigneeItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/AssigneeItemProvider.java
@@ -67,8 +67,8 @@ public class AssigneeItemProvider extends SecurityItemItemProvider implements IE
{
super.getPropertyDescriptors(object);
- addRolesPropertyDescriptor(object);
addIdPropertyDescriptor(object);
+ addRolesPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java
index 2631c29fc4..e793a2a4fc 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java
@@ -8,6 +8,7 @@ import org.eclipse.emf.cdo.security.SecurityPackage;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -58,24 +59,26 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
{
super.getPropertyDescriptors(object);
- addClassesPropertyDescriptor(object);
+ addApplicableClassPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Classes feature.
+ * This adds a property descriptor for the Applicable Class feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addClassesPropertyDescriptor(Object object)
+ protected void addApplicableClassPropertyDescriptor(Object object)
{
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_ClassCheck_classes_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_ClassCheck_classes_feature", "_UI_ClassCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.CLASS_CHECK__CLASSES, true, false, true, null, null, null));
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ClassCheck_applicableClass_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_ClassCheck_applicableClass_feature", "_UI_ClassCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.CLASS_CHECK__APPLICABLE_CLASS, true, false, true, null, null, null));
}
/**
@@ -105,15 +108,22 @@ public class ClassCheckItemProvider extends CheckItemProvider implements IEditin
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
Permission labelValue = ((ClassCheck)object).getPermission();
+ EClass applicableClass = ((ClassCheck)object).getApplicableClass();
String label = labelValue == null ? null : labelValue.toString();
+
+ if (applicableClass != null)
+ {
+ label += " " + applicableClass.getName();
+ }
+
return label == null || label.length() == 0 ? getString("_UI_ClassCheck_type") : //$NON-NLS-1$
- getString("_UI_ClassCheck_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/DirectoryItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/DirectoryItemProvider.java
index 26b6761698..6295b195ba 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/DirectoryItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/DirectoryItemProvider.java
@@ -151,14 +151,14 @@ public class DirectoryItemProvider extends SecurityItemItemProvider implements I
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
String label = ((Directory)object).getName();
return label == null || label.length() == 0 ? getString("_UI_Directory_type") : //$NON-NLS-1$
- getString("_UI_Directory_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/GroupItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/GroupItemProvider.java
index aee28b3b49..5261d0a65b 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/GroupItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/GroupItemProvider.java
@@ -65,9 +65,9 @@ public class GroupItemProvider extends AssigneeItemProvider implements IEditingD
{
super.getPropertyDescriptors(object);
+ addUsersPropertyDescriptor(object);
addInheritedGroupsPropertyDescriptor(object);
addInheritingGroupsPropertyDescriptor(object);
- addUsersPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -144,14 +144,14 @@ public class GroupItemProvider extends AssigneeItemProvider implements IEditingD
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
String label = ((Group)object).getId();
return label == null || label.length() == 0 ? getString("_UI_Group_type") : //$NON-NLS-1$
- getString("_UI_Group_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java
index 61d97265a0..5d4848d765 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java
@@ -58,24 +58,26 @@ public class PackageCheckItemProvider extends CheckItemProvider implements IEdit
{
super.getPropertyDescriptors(object);
- addPackagesPropertyDescriptor(object);
+ addApplicablePackagePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Packages feature.
+ * This adds a property descriptor for the Applicable Package feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addPackagesPropertyDescriptor(Object object)
+ protected void addApplicablePackagePropertyDescriptor(Object object)
{
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(),
- getString("_UI_PackageCheck_packages_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_PackageCheck_packages_feature", "_UI_PackageCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.PACKAGE_CHECK__PACKAGES, true, false, true, null, null, null));
+ itemPropertyDescriptors
+ .add(createItemPropertyDescriptor(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PackageCheck_applicablePackage_feature"), //$NON-NLS-1$
+ getString(
+ "_UI_PropertyDescriptor_description", "_UI_PackageCheck_applicablePackage_feature", "_UI_PackageCheck_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.PACKAGE_CHECK__APPLICABLE_PACKAGE, true, false, true, null, null, null));
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
index 4603773473..50cb93d207 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RealmItemProvider.java
@@ -169,14 +169,14 @@ public class RealmItemProvider extends SecurityElementItemProvider implements IE
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
String label = ((Realm)object).getName();
return label == null || label.length() == 0 ? getString("_UI_Realm_type") : //$NON-NLS-1$
- getString("_UI_Realm_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
index ddcdae5f79..fc456262b5 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/RoleItemProvider.java
@@ -69,8 +69,8 @@ public class RoleItemProvider extends SecurityItemItemProvider implements IEditi
{
super.getPropertyDescriptors(object);
- addAssigneesPropertyDescriptor(object);
addIdPropertyDescriptor(object);
+ addAssigneesPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -165,14 +165,14 @@ public class RoleItemProvider extends SecurityItemItemProvider implements IEditi
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
String label = ((Role)object).getId();
return label == null || label.length() == 0 ? getString("_UI_Role_type") : //$NON-NLS-1$
- getString("_UI_Role_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
index b25747a028..349a508a8d 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserItemProvider.java
@@ -69,13 +69,13 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
{
super.getPropertyDescriptors(object);
- addGroupsPropertyDescriptor(object);
addLabelPropertyDescriptor(object);
addFirstNamePropertyDescriptor(object);
addLastNamePropertyDescriptor(object);
addEmailPropertyDescriptor(object);
addDefaultPermissionOverridePropertyDescriptor(object);
addLockedPropertyDescriptor(object);
+ addGroupsPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
@@ -257,14 +257,14 @@ public class UserItemProvider extends AssigneeItemProvider implements IEditingDo
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
String label = ((User)object).getId();
return label == null || label.length() == 0 ? getString("_UI_User_type") : //$NON-NLS-1$
- getString("_UI_User_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ label;
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserPasswordItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserPasswordItemProvider.java
index ad0ec6be20..a5df9a5ea1 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserPasswordItemProvider.java
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/UserPasswordItemProvider.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.security.UserPassword;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
-import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IChildCreationExtender;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemColorProvider;
@@ -29,7 +28,6 @@ import org.eclipse.emf.edit.provider.ITableItemColorProvider;
import org.eclipse.emf.edit.provider.ITableItemFontProvider;
import org.eclipse.emf.edit.provider.ITableItemLabelProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
-import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
@@ -70,29 +68,11 @@ public class UserPasswordItemProvider extends ItemProviderAdapter implements IEd
{
super.getPropertyDescriptors(object);
- addEncryptedPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the Encrypted feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected void addEncryptedPropertyDescriptor(Object object)
- {
- itemPropertyDescriptors.add(createItemPropertyDescriptor(
- ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_UserPassword_encrypted_feature"), //$NON-NLS-1$
- getString("_UI_PropertyDescriptor_description", "_UI_UserPassword_encrypted_feature", "_UI_UserPassword_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- SecurityPackage.Literals.USER_PASSWORD__ENCRYPTED, true, false, false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));
- }
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -130,14 +110,12 @@ public class UserPasswordItemProvider extends ItemProviderAdapter implements IEd
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @generated
+ * @generated NOT
*/
@Override
public String getText(Object object)
{
- String label = ((UserPassword)object).getEncrypted();
- return label == null || label.length() == 0 ? getString("_UI_UserPassword_type") : //$NON-NLS-1$
- getString("_UI_UserPassword_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ return getString("_UI_UserPassword_type"); //$NON-NLS-1$
}
/**
diff --git a/plugins/org.eclipse.emf.cdo.security/model/security.ecore b/plugins/org.eclipse.emf.cdo.security/model/security.ecore
index bbe75c2177..07d568f022 100644
--- a/plugins/org.eclipse.emf.cdo.security/model/security.ecore
+++ b/plugins/org.eclipse.emf.cdo.security/model/security.ecore
@@ -26,18 +26,20 @@
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Role" eSuperTypes="#//SecurityItem">
- <eStructuralFeatures xsi:type="ecore:EReference" name="assignees" upperBound="-1"
- eType="#//Assignee" eOpposite="#//Assignee/roles"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="checks" upperBound="-1"
eType="#//Check" containment="true" eOpposite="#//Check/role"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="assignees" upperBound="-1"
+ eType="#//Assignee" eOpposite="#//Assignee/roles"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Assignee" abstract="true" eSuperTypes="#//SecurityItem">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="roles" upperBound="-1"
eType="#//Role" eOpposite="#//Role/assignees"/>
- <eStructuralFeatures xsi:type="ecore:EAttribute" name="id" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Group" eSuperTypes="#//Assignee">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="users" upperBound="-1"
+ eType="#//User" eOpposite="#//User/groups"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="inheritedGroups" upperBound="-1"
eType="#//Group" eOpposite="#//Group/inheritingGroups"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="inheritingGroups" upperBound="-1"
@@ -48,20 +50,8 @@
eType="#//Group" changeable="false" volatile="true" transient="true" derived="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="allRoles" upperBound="-1"
eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="users" upperBound="-1"
- eType="#//User" eOpposite="#//User/groups"/>
</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:EReference" name="allGroups" upperBound="-1"
- eType="#//Group" changeable="false" volatile="true" transient="true" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="allRoles" upperBound="-1"
- eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="allChecks" upperBound="-1"
- eType="#//Check" changeable="false" volatile="true" transient="true" derived="true"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="unassignedRoles" upperBound="-1"
- eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/>
<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"/>
@@ -74,6 +64,16 @@
<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"
+ eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="allChecks" upperBound="-1"
+ eType="#//Check" changeable="false" volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="unassignedRoles" upperBound="-1"
+ eType="#//Role" changeable="false" volatile="true" transient="true" derived="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="UserPassword">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="encrypted" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
@@ -85,12 +85,12 @@
eType="#//Permission" defaultValueLiteral="WRITE"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ClassCheck" eSuperTypes="#//Check">
- <eStructuralFeatures xsi:type="ecore:EReference" name="classes" lowerBound="1"
- upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="applicableClass" lowerBound="1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PackageCheck" eSuperTypes="#//Check">
- <eStructuralFeatures xsi:type="ecore:EReference" name="packages" lowerBound="1"
- upperBound="-1" eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="applicablePackage" lowerBound="1"
+ eType="ecore:EClass platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ResourceCheck" eSuperTypes="#//Check">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="pattern" eType="ecore:EDataType platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EString"/>
diff --git a/plugins/org.eclipse.emf.cdo.security/model/security.genmodel b/plugins/org.eclipse.emf.cdo.security/model/security.genmodel
index 2e01449c8c..b852f724df 100644
--- a/plugins/org.eclipse.emf.cdo.security/model/security.genmodel
+++ b/plugins/org.eclipse.emf.cdo.security/model/security.genmodel
@@ -66,7 +66,7 @@
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference security.ecore#//User/password"/>
</genClasses>
<genClasses ecoreClass="security.ecore#//UserPassword">
- <genFeatures createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//UserPassword/encrypted"/>
+ <genFeatures property="None" createChild="false" ecoreFeature="ecore:EAttribute security.ecore#//UserPassword/encrypted"/>
</genClasses>
<genClasses image="false" ecoreClass="security.ecore#//Check">
<genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference security.ecore#//Check/role"/>
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Assignee.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Assignee.java
index f9b94d6f8b..8b63da2de1 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Assignee.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Assignee.java
@@ -20,8 +20,8 @@ import org.eclipse.emf.common.util.EList;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.Assignee#getRoles <em>Roles</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Assignee#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.Assignee#getRoles <em>Roles</em>}</li>
* </ul>
* </p>
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java
index 262e0c5bb8..446fa470e1 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.cdo.security;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
@@ -21,7 +20,7 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.ClassCheck#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.ClassCheck#getApplicableClass <em>Applicable Class</em>}</li>
* </ul>
* </p>
*
@@ -32,19 +31,29 @@ import org.eclipse.emf.ecore.EClass;
public interface ClassCheck extends Check
{
/**
- * Returns the value of the '<em><b>Classes</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EClass}.
+ * Returns the value of the '<em><b>Applicable Class</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Classes</em>' reference list isn't clear,
+ * If the meaning of the '<em>Applicable Class</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Classes</em>' reference list.
- * @see org.eclipse.emf.cdo.security.SecurityPackage#getClassCheck_Classes()
+ * @return the value of the '<em>Applicable Class</em>' reference.
+ * @see #setApplicableClass(EClass)
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getClassCheck_ApplicableClass()
* @model required="true"
* @generated
*/
- EList<EClass> getClasses();
+ EClass getApplicableClass();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.security.ClassCheck#getApplicableClass <em>Applicable Class</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Applicable Class</em>' reference.
+ * @see #getApplicableClass()
+ * @generated
+ */
+ void setApplicableClass(EClass value);
} // ClassCheck
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Group.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Group.java
index b515261d3f..10edc7abcd 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Group.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Group.java
@@ -20,12 +20,12 @@ import org.eclipse.emf.common.util.EList;
* <p>
* The following features are supported:
* <ul>
+ * <li>{@link org.eclipse.emf.cdo.security.Group#getUsers <em>Users</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Group#getInheritedGroups <em>Inherited Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Group#getInheritingGroups <em>Inheriting Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Group#getAllInheritedGroups <em>All Inherited Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Group#getAllInheritingGroups <em>All Inheriting Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Group#getAllRoles <em>All Roles</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.security.Group#getUsers <em>Users</em>}</li>
* </ul>
* </p>
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java
index 54fbfe6e2a..70fab3e9fc 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java
@@ -10,7 +10,6 @@
*/
package org.eclipse.emf.cdo.security;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EPackage;
/**
@@ -21,7 +20,7 @@ import org.eclipse.emf.ecore.EPackage;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.PackageCheck#getPackages <em>Packages</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.PackageCheck#getApplicablePackage <em>Applicable Package</em>}</li>
* </ul>
* </p>
*
@@ -32,19 +31,29 @@ import org.eclipse.emf.ecore.EPackage;
public interface PackageCheck extends Check
{
/**
- * Returns the value of the '<em><b>Packages</b></em>' reference list.
- * The list contents are of type {@link org.eclipse.emf.ecore.EPackage}.
+ * Returns the value of the '<em><b>Applicable Package</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Packages</em>' reference list isn't clear,
+ * If the meaning of the '<em>Applicable Package</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
- * @return the value of the '<em>Packages</em>' reference list.
- * @see org.eclipse.emf.cdo.security.SecurityPackage#getPackageCheck_Packages()
+ * @return the value of the '<em>Applicable Package</em>' reference.
+ * @see #setApplicablePackage(EPackage)
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getPackageCheck_ApplicablePackage()
* @model required="true"
* @generated
*/
- EList<EPackage> getPackages();
+ EPackage getApplicablePackage();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.security.PackageCheck#getApplicablePackage <em>Applicable Package</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Applicable Package</em>' reference.
+ * @see #getApplicablePackage()
+ * @generated
+ */
+ void setApplicablePackage(EPackage value);
} // PackageCheck
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Role.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Role.java
index d0dd96d0e3..16f273fbe8 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Role.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Role.java
@@ -20,9 +20,9 @@ import org.eclipse.emf.common.util.EList;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.Role#getAssignees <em>Assignees</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.security.Role#getChecks <em>Checks</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.Role#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.Role#getChecks <em>Checks</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.Role#getAssignees <em>Assignees</em>}</li>
* </ul>
* </p>
*
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 9091c471fd..20f6f0ad31 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
@@ -280,13 +280,13 @@ public interface SecurityPackage extends EPackage
int ROLE__ANNOTATIONS = SECURITY_ITEM__ANNOTATIONS;
/**
- * The feature id for the '<em><b>Assignees</b></em>' reference list.
+ * The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ROLE__ASSIGNEES = SECURITY_ITEM_FEATURE_COUNT + 0;
+ int ROLE__ID = SECURITY_ITEM_FEATURE_COUNT + 0;
/**
* The feature id for the '<em><b>Checks</b></em>' containment reference list.
@@ -298,13 +298,13 @@ public interface SecurityPackage extends EPackage
int ROLE__CHECKS = SECURITY_ITEM_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>Id</b></em>' attribute.
+ * The feature id for the '<em><b>Assignees</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ROLE__ID = SECURITY_ITEM_FEATURE_COUNT + 2;
+ int ROLE__ASSIGNEES = SECURITY_ITEM_FEATURE_COUNT + 2;
/**
* The number of structural features of the '<em>Role</em>' class.
@@ -335,22 +335,22 @@ public interface SecurityPackage extends EPackage
int ASSIGNEE__ANNOTATIONS = SECURITY_ITEM__ANNOTATIONS;
/**
- * The feature id for the '<em><b>Roles</b></em>' reference list.
+ * The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ASSIGNEE__ROLES = SECURITY_ITEM_FEATURE_COUNT + 0;
+ int ASSIGNEE__ID = SECURITY_ITEM_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Id</b></em>' attribute.
+ * The feature id for the '<em><b>Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ASSIGNEE__ID = SECURITY_ITEM_FEATURE_COUNT + 1;
+ int ASSIGNEE__ROLES = SECURITY_ITEM_FEATURE_COUNT + 1;
/**
* The number of structural features of the '<em>Assignee</em>' class.
@@ -381,76 +381,76 @@ public interface SecurityPackage extends EPackage
int GROUP__ANNOTATIONS = ASSIGNEE__ANNOTATIONS;
/**
- * The feature id for the '<em><b>Roles</b></em>' reference list.
+ * The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__ROLES = ASSIGNEE__ROLES;
+ int GROUP__ID = ASSIGNEE__ID;
/**
- * The feature id for the '<em><b>Id</b></em>' attribute.
+ * The feature id for the '<em><b>Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__ID = ASSIGNEE__ID;
+ int GROUP__ROLES = ASSIGNEE__ROLES;
/**
- * The feature id for the '<em><b>Inherited Groups</b></em>' reference list.
+ * The feature id for the '<em><b>Users</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__INHERITED_GROUPS = ASSIGNEE_FEATURE_COUNT + 0;
+ int GROUP__USERS = ASSIGNEE_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Inheriting Groups</b></em>' reference list.
+ * The feature id for the '<em><b>Inherited Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__INHERITING_GROUPS = ASSIGNEE_FEATURE_COUNT + 1;
+ int GROUP__INHERITED_GROUPS = ASSIGNEE_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>All Inherited Groups</b></em>' reference list.
+ * The feature id for the '<em><b>Inheriting Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__ALL_INHERITED_GROUPS = ASSIGNEE_FEATURE_COUNT + 2;
+ int GROUP__INHERITING_GROUPS = ASSIGNEE_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>All Inheriting Groups</b></em>' reference list.
+ * The feature id for the '<em><b>All Inherited Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__ALL_INHERITING_GROUPS = ASSIGNEE_FEATURE_COUNT + 3;
+ int GROUP__ALL_INHERITED_GROUPS = ASSIGNEE_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>All Roles</b></em>' reference list.
+ * The feature id for the '<em><b>All Inheriting Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__ALL_ROLES = ASSIGNEE_FEATURE_COUNT + 4;
+ int GROUP__ALL_INHERITING_GROUPS = ASSIGNEE_FEATURE_COUNT + 4;
/**
- * The feature id for the '<em><b>Users</b></em>' reference list.
+ * The feature id for the '<em><b>All Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int GROUP__USERS = ASSIGNEE_FEATURE_COUNT + 5;
+ int GROUP__ALL_ROLES = ASSIGNEE_FEATURE_COUNT + 5;
/**
* The number of structural features of the '<em>Group</em>' class.
@@ -481,139 +481,139 @@ public interface SecurityPackage extends EPackage
int USER__ANNOTATIONS = ASSIGNEE__ANNOTATIONS;
/**
- * The feature id for the '<em><b>Roles</b></em>' reference list.
+ * The feature id for the '<em><b>Id</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__ROLES = ASSIGNEE__ROLES;
+ int USER__ID = ASSIGNEE__ID;
/**
- * The feature id for the '<em><b>Id</b></em>' attribute.
+ * The feature id for the '<em><b>Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__ID = ASSIGNEE__ID;
+ int USER__ROLES = ASSIGNEE__ROLES;
/**
- * The feature id for the '<em><b>Groups</b></em>' reference list.
+ * The feature id for the '<em><b>Label</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__GROUPS = ASSIGNEE_FEATURE_COUNT + 0;
+ int USER__LABEL = ASSIGNEE_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>All Groups</b></em>' reference list.
+ * The feature id for the '<em><b>First Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__ALL_GROUPS = ASSIGNEE_FEATURE_COUNT + 1;
+ int USER__FIRST_NAME = ASSIGNEE_FEATURE_COUNT + 1;
/**
- * The feature id for the '<em><b>All Roles</b></em>' reference list.
+ * The feature id for the '<em><b>Last Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__ALL_ROLES = ASSIGNEE_FEATURE_COUNT + 2;
+ int USER__LAST_NAME = ASSIGNEE_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>All Checks</b></em>' reference list.
+ * The feature id for the '<em><b>Email</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__ALL_CHECKS = ASSIGNEE_FEATURE_COUNT + 3;
+ int USER__EMAIL = ASSIGNEE_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>Unassigned Roles</b></em>' reference list.
+ * The feature id for the '<em><b>Default Permission Override</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__UNASSIGNED_ROLES = ASSIGNEE_FEATURE_COUNT + 4;
+ int USER__DEFAULT_PERMISSION_OVERRIDE = ASSIGNEE_FEATURE_COUNT + 4;
/**
- * The feature id for the '<em><b>Label</b></em>' attribute.
+ * The feature id for the '<em><b>Default Permission</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__LABEL = ASSIGNEE_FEATURE_COUNT + 5;
+ int USER__DEFAULT_PERMISSION = ASSIGNEE_FEATURE_COUNT + 5;
/**
- * The feature id for the '<em><b>First Name</b></em>' attribute.
+ * The feature id for the '<em><b>Locked</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__FIRST_NAME = ASSIGNEE_FEATURE_COUNT + 6;
+ int USER__LOCKED = ASSIGNEE_FEATURE_COUNT + 6;
/**
- * The feature id for the '<em><b>Last Name</b></em>' attribute.
+ * The feature id for the '<em><b>Password</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__LAST_NAME = ASSIGNEE_FEATURE_COUNT + 7;
+ int USER__PASSWORD = ASSIGNEE_FEATURE_COUNT + 7;
/**
- * The feature id for the '<em><b>Email</b></em>' attribute.
+ * The feature id for the '<em><b>Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__EMAIL = ASSIGNEE_FEATURE_COUNT + 8;
+ int USER__GROUPS = ASSIGNEE_FEATURE_COUNT + 8;
/**
- * The feature id for the '<em><b>Default Permission Override</b></em>' attribute.
+ * The feature id for the '<em><b>All Groups</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__DEFAULT_PERMISSION_OVERRIDE = ASSIGNEE_FEATURE_COUNT + 9;
+ int USER__ALL_GROUPS = ASSIGNEE_FEATURE_COUNT + 9;
/**
- * The feature id for the '<em><b>Default Permission</b></em>' attribute.
+ * The feature id for the '<em><b>All Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__DEFAULT_PERMISSION = ASSIGNEE_FEATURE_COUNT + 10;
+ int USER__ALL_ROLES = ASSIGNEE_FEATURE_COUNT + 10;
/**
- * The feature id for the '<em><b>Locked</b></em>' attribute.
+ * The feature id for the '<em><b>All Checks</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__LOCKED = ASSIGNEE_FEATURE_COUNT + 11;
+ int USER__ALL_CHECKS = ASSIGNEE_FEATURE_COUNT + 11;
/**
- * The feature id for the '<em><b>Password</b></em>' containment reference.
+ * The feature id for the '<em><b>Unassigned Roles</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int USER__PASSWORD = ASSIGNEE_FEATURE_COUNT + 12;
+ int USER__UNASSIGNED_ROLES = ASSIGNEE_FEATURE_COUNT + 12;
/**
* The number of structural features of the '<em>User</em>' class.
@@ -718,13 +718,13 @@ public interface SecurityPackage extends EPackage
int CLASS_CHECK__PERMISSION = CHECK__PERMISSION;
/**
- * The feature id for the '<em><b>Classes</b></em>' reference list.
+ * The feature id for the '<em><b>Applicable Class</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int CLASS_CHECK__CLASSES = CHECK_FEATURE_COUNT + 0;
+ int CLASS_CHECK__APPLICABLE_CLASS = CHECK_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Class Check</em>' class.
@@ -764,13 +764,13 @@ public interface SecurityPackage extends EPackage
int PACKAGE_CHECK__PERMISSION = CHECK__PERMISSION;
/**
- * The feature id for the '<em><b>Packages</b></em>' reference list.
+ * The feature id for the '<em><b>Applicable Package</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PACKAGE_CHECK__PACKAGES = CHECK_FEATURE_COUNT + 0;
+ int PACKAGE_CHECK__APPLICABLE_PACKAGE = CHECK_FEATURE_COUNT + 0;
/**
* The number of structural features of the '<em>Package Check</em>' class.
@@ -1344,15 +1344,15 @@ public interface SecurityPackage extends EPackage
EClass getClassCheck();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.ClassCheck#getClasses <em>Classes</em>}'.
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.security.ClassCheck#getApplicableClass <em>Applicable Class</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Classes</em>'.
- * @see org.eclipse.emf.cdo.security.ClassCheck#getClasses()
+ * @return the meta object for the reference '<em>Applicable Class</em>'.
+ * @see org.eclipse.emf.cdo.security.ClassCheck#getApplicableClass()
* @see #getClassCheck()
* @generated
*/
- EReference getClassCheck_Classes();
+ EReference getClassCheck_ApplicableClass();
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.security.PackageCheck <em>Package Check</em>}'.
@@ -1365,15 +1365,15 @@ public interface SecurityPackage extends EPackage
EClass getPackageCheck();
/**
- * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.PackageCheck#getPackages <em>Packages</em>}'.
+ * Returns the meta object for the reference '{@link org.eclipse.emf.cdo.security.PackageCheck#getApplicablePackage <em>Applicable Package</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference list '<em>Packages</em>'.
- * @see org.eclipse.emf.cdo.security.PackageCheck#getPackages()
+ * @return the meta object for the reference '<em>Applicable Package</em>'.
+ * @see org.eclipse.emf.cdo.security.PackageCheck#getApplicablePackage()
* @see #getPackageCheck()
* @generated
*/
- EReference getPackageCheck_Packages();
+ EReference getPackageCheck_ApplicablePackage();
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.security.ResourceCheck <em>Resource Check</em>}'.
@@ -1828,12 +1828,12 @@ public interface SecurityPackage extends EPackage
EClass CLASS_CHECK = eINSTANCE.getClassCheck();
/**
- * The meta object literal for the '<em><b>Classes</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Applicable Class</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference CLASS_CHECK__CLASSES = eINSTANCE.getClassCheck_Classes();
+ EReference CLASS_CHECK__APPLICABLE_CLASS = eINSTANCE.getClassCheck_ApplicableClass();
/**
* The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.PackageCheckImpl <em>Package Check</em>}' class.
@@ -1846,12 +1846,12 @@ public interface SecurityPackage extends EPackage
EClass PACKAGE_CHECK = eINSTANCE.getPackageCheck();
/**
- * The meta object literal for the '<em><b>Packages</b></em>' reference list feature.
+ * The meta object literal for the '<em><b>Applicable Package</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference PACKAGE_CHECK__PACKAGES = eINSTANCE.getPackageCheck_Packages();
+ EReference PACKAGE_CHECK__APPLICABLE_PACKAGE = eINSTANCE.getPackageCheck_ApplicablePackage();
/**
* The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.ResourceCheckImpl <em>Resource Check</em>}' class.
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 c7e1bf94a1..f5439d1942 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,11 +20,6 @@ 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#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>
- * <li>{@link org.eclipse.emf.cdo.security.User#getUnassignedRoles <em>Unassigned Roles</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>
@@ -33,6 +28,11 @@ 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>
+ * <li>{@link org.eclipse.emf.cdo.security.User#getUnassignedRoles <em>Unassigned Roles</em>}</li>
* </ul>
* </p>
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/AssigneeImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/AssigneeImpl.java
index 752bfe3895..641552b877 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/AssigneeImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/AssigneeImpl.java
@@ -24,8 +24,8 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.impl.AssigneeImpl#getRoles <em>Roles</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.AssigneeImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.AssigneeImpl#getRoles <em>Roles</em>}</li>
* </ul>
* </p>
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
index 45ef202bd7..1071017889 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionProvider;
import org.eclipse.emf.cdo.security.ClassCheck;
import org.eclipse.emf.cdo.security.SecurityPackage;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
/**
@@ -26,7 +25,7 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.impl.ClassCheckImpl#getClasses <em>Classes</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.ClassCheckImpl#getApplicableClass <em>Applicable Class</em>}</li>
* </ul>
* </p>
*
@@ -60,24 +59,26 @@ public class ClassCheckImpl extends CheckImpl implements ClassCheck
* <!-- end-user-doc -->
* @generated
*/
- @SuppressWarnings("unchecked")
- public EList<EClass> getClasses()
+ public EClass getApplicableClass()
{
- return (EList<EClass>)eGet(SecurityPackage.Literals.CLASS_CHECK__CLASSES, true);
+ return (EClass)eGet(SecurityPackage.Literals.CLASS_CHECK__APPLICABLE_CLASS, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setApplicableClass(EClass newApplicableClass)
+ {
+ eSet(SecurityPackage.Literals.CLASS_CHECK__APPLICABLE_CLASS, newApplicableClass);
}
public boolean isApplicable(CDORevision revision, CDORevisionProvider revisionProvider, CDOBranchPoint securityContext)
{
EClass actualClass = revision.getEClass();
- for (EClass applicableClass : getClasses())
- {
- if (actualClass == applicableClass)
- {
- return true;
- }
- }
-
- return false;
+ EClass applicableClass = getApplicableClass();
+ return actualClass == applicableClass;
}
} // ClassCheckImpl
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/GroupImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/GroupImpl.java
index 6e133b49b8..6768328777 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/GroupImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/GroupImpl.java
@@ -29,12 +29,12 @@ import java.util.Set;
* <p>
* The following features are implemented:
* <ul>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getUsers <em>Users</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getInheritedGroups <em>Inherited Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getInheritingGroups <em>Inheriting Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getAllInheritedGroups <em>All Inherited Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getAllInheritingGroups <em>All Inheriting Groups</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getAllRoles <em>All Roles</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.security.impl.GroupImpl#getUsers <em>Users</em>}</li>
* </ul>
* </p>
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
index 1af882b2fa..75b6180a41 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
@@ -16,7 +16,6 @@ import org.eclipse.emf.cdo.common.revision.CDORevisionProvider;
import org.eclipse.emf.cdo.security.PackageCheck;
import org.eclipse.emf.cdo.security.SecurityPackage;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
@@ -27,7 +26,7 @@ import org.eclipse.emf.ecore.EPackage;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.impl.PackageCheckImpl#getPackages <em>Packages</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.PackageCheckImpl#getApplicablePackage <em>Applicable Package</em>}</li>
* </ul>
* </p>
*
@@ -61,24 +60,26 @@ public class PackageCheckImpl extends CheckImpl implements PackageCheck
* <!-- end-user-doc -->
* @generated
*/
- @SuppressWarnings("unchecked")
- public EList<EPackage> getPackages()
+ public EPackage getApplicablePackage()
{
- return (EList<EPackage>)eGet(SecurityPackage.Literals.PACKAGE_CHECK__PACKAGES, true);
+ return (EPackage)eGet(SecurityPackage.Literals.PACKAGE_CHECK__APPLICABLE_PACKAGE, true);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setApplicablePackage(EPackage newApplicablePackage)
+ {
+ eSet(SecurityPackage.Literals.PACKAGE_CHECK__APPLICABLE_PACKAGE, newApplicablePackage);
}
public boolean isApplicable(CDORevision revision, CDORevisionProvider revisionProvider, CDOBranchPoint securityContext)
{
EPackage actualPackage = revision.getEClass().getEPackage();
- for (EPackage applicablePackage : getPackages())
- {
- if (actualPackage == applicablePackage)
- {
- return true;
- }
- }
-
- return false;
+ EPackage applicablePackage = getApplicablePackage();
+ return actualPackage == applicablePackage;
}
} // PackageCheckImpl
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RealmImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RealmImpl.java
index fbd500f7c8..02b9d01bd9 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RealmImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RealmImpl.java
@@ -64,7 +64,7 @@ public class RealmImpl extends SecurityElementImpl implements Realm
protected Object[] getData()
{
EList<SecurityItem> items = getItems();
- return RealmUtil.allUsers(items).data();
+ return RealmUtil.allUsers(items).toArray();
}
};
@@ -86,7 +86,7 @@ public class RealmImpl extends SecurityElementImpl implements Realm
protected Object[] getData()
{
EList<SecurityItem> items = getItems();
- return RealmUtil.allGroups(items).data();
+ return RealmUtil.allGroups(items).toArray();
}
};
@@ -108,7 +108,7 @@ public class RealmImpl extends SecurityElementImpl implements Realm
protected Object[] getData()
{
EList<SecurityItem> items = getItems();
- return RealmUtil.allRoles(items).data();
+ return RealmUtil.allRoles(items).toArray();
}
};
@@ -130,7 +130,7 @@ public class RealmImpl extends SecurityElementImpl implements Realm
protected Object[] getData()
{
EList<SecurityItem> items = getItems();
- return RealmUtil.allChecks(items).data();
+ return RealmUtil.allChecks(items).toArray();
}
};
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RoleImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RoleImpl.java
index 0959a2d222..dd0c3fc565 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RoleImpl.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/RoleImpl.java
@@ -25,9 +25,9 @@ import org.eclipse.emf.ecore.EClass;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.emf.cdo.security.impl.RoleImpl#getAssignees <em>Assignees</em>}</li>
- * <li>{@link org.eclipse.emf.cdo.security.impl.RoleImpl#getChecks <em>Checks</em>}</li>
* <li>{@link org.eclipse.emf.cdo.security.impl.RoleImpl#getId <em>Id</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.RoleImpl#getChecks <em>Checks</em>}</li>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.RoleImpl#getAssignees <em>Assignees</em>}</li>
* </ul>
* </p>
*
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 7e4edb4037..09c0c8cad6 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
@@ -356,7 +356,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getRole_Assignees()
{
- return (EReference)roleEClass.getEStructuralFeatures().get(0);
+ return (EReference)roleEClass.getEStructuralFeatures().get(2);
}
/**
@@ -366,7 +366,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getRole_Id()
{
- return (EAttribute)roleEClass.getEStructuralFeatures().get(2);
+ return (EAttribute)roleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -396,7 +396,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getAssignee_Roles()
{
- return (EReference)assigneeEClass.getEStructuralFeatures().get(0);
+ return (EReference)assigneeEClass.getEStructuralFeatures().get(1);
}
/**
@@ -406,7 +406,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getAssignee_Id()
{
- return (EAttribute)assigneeEClass.getEStructuralFeatures().get(1);
+ return (EAttribute)assigneeEClass.getEStructuralFeatures().get(0);
}
/**
@@ -426,7 +426,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_Users()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(5);
+ return (EReference)groupEClass.getEStructuralFeatures().get(0);
}
/**
@@ -436,7 +436,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_InheritedGroups()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(0);
+ return (EReference)groupEClass.getEStructuralFeatures().get(1);
}
/**
@@ -446,7 +446,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_InheritingGroups()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(1);
+ return (EReference)groupEClass.getEStructuralFeatures().get(2);
}
/**
@@ -456,7 +456,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_AllInheritingGroups()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(3);
+ return (EReference)groupEClass.getEStructuralFeatures().get(4);
}
/**
@@ -466,7 +466,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_AllInheritedGroups()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(2);
+ return (EReference)groupEClass.getEStructuralFeatures().get(3);
}
/**
@@ -476,7 +476,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getGroup_AllRoles()
{
- return (EReference)groupEClass.getEStructuralFeatures().get(4);
+ return (EReference)groupEClass.getEStructuralFeatures().get(5);
}
/**
@@ -496,7 +496,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_Groups()
{
- return (EReference)userEClass.getEStructuralFeatures().get(0);
+ return (EReference)userEClass.getEStructuralFeatures().get(8);
}
/**
@@ -506,7 +506,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_AllGroups()
{
- return (EReference)userEClass.getEStructuralFeatures().get(1);
+ return (EReference)userEClass.getEStructuralFeatures().get(9);
}
/**
@@ -516,7 +516,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_AllRoles()
{
- return (EReference)userEClass.getEStructuralFeatures().get(2);
+ return (EReference)userEClass.getEStructuralFeatures().get(10);
}
/**
@@ -526,7 +526,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_AllChecks()
{
- return (EReference)userEClass.getEStructuralFeatures().get(3);
+ return (EReference)userEClass.getEStructuralFeatures().get(11);
}
/**
@@ -536,7 +536,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_UnassignedRoles()
{
- return (EReference)userEClass.getEStructuralFeatures().get(4);
+ return (EReference)userEClass.getEStructuralFeatures().get(12);
}
/**
@@ -546,7 +546,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_Label()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(5);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(0);
}
/**
@@ -556,7 +556,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_FirstName()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(6);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(1);
}
/**
@@ -566,7 +566,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_LastName()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(7);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(2);
}
/**
@@ -576,7 +576,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_Email()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(8);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(3);
}
/**
@@ -586,7 +586,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_DefaultPermissionOverride()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(9);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(4);
}
/**
@@ -596,7 +596,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_DefaultPermission()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(10);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(5);
}
/**
@@ -606,7 +606,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EAttribute getUser_Locked()
{
- return (EAttribute)userEClass.getEStructuralFeatures().get(11);
+ return (EAttribute)userEClass.getEStructuralFeatures().get(6);
}
/**
@@ -616,7 +616,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
*/
public EReference getUser_Password()
{
- return (EReference)userEClass.getEStructuralFeatures().get(12);
+ return (EReference)userEClass.getEStructuralFeatures().get(7);
}
/**
@@ -684,7 +684,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
* <!-- end-user-doc -->
* @generated
*/
- public EReference getClassCheck_Classes()
+ public EReference getClassCheck_ApplicableClass()
{
return (EReference)classCheckEClass.getEStructuralFeatures().get(0);
}
@@ -704,7 +704,7 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
* <!-- end-user-doc -->
* @generated
*/
- public EReference getPackageCheck_Packages()
+ public EReference getPackageCheck_ApplicablePackage()
{
return (EReference)packageCheckEClass.getEStructuralFeatures().get(0);
}
@@ -788,28 +788,23 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
createEAttribute(directoryEClass, DIRECTORY__NAME);
roleEClass = createEClass(ROLE);
- createEReference(roleEClass, ROLE__ASSIGNEES);
- createEReference(roleEClass, ROLE__CHECKS);
createEAttribute(roleEClass, ROLE__ID);
+ createEReference(roleEClass, ROLE__CHECKS);
+ createEReference(roleEClass, ROLE__ASSIGNEES);
assigneeEClass = createEClass(ASSIGNEE);
- createEReference(assigneeEClass, ASSIGNEE__ROLES);
createEAttribute(assigneeEClass, ASSIGNEE__ID);
+ createEReference(assigneeEClass, ASSIGNEE__ROLES);
groupEClass = createEClass(GROUP);
+ createEReference(groupEClass, GROUP__USERS);
createEReference(groupEClass, GROUP__INHERITED_GROUPS);
createEReference(groupEClass, GROUP__INHERITING_GROUPS);
createEReference(groupEClass, GROUP__ALL_INHERITED_GROUPS);
createEReference(groupEClass, GROUP__ALL_INHERITING_GROUPS);
createEReference(groupEClass, GROUP__ALL_ROLES);
- createEReference(groupEClass, GROUP__USERS);
userEClass = createEClass(USER);
- createEReference(userEClass, USER__GROUPS);
- createEReference(userEClass, USER__ALL_GROUPS);
- createEReference(userEClass, USER__ALL_ROLES);
- createEReference(userEClass, USER__ALL_CHECKS);
- createEReference(userEClass, USER__UNASSIGNED_ROLES);
createEAttribute(userEClass, USER__LABEL);
createEAttribute(userEClass, USER__FIRST_NAME);
createEAttribute(userEClass, USER__LAST_NAME);
@@ -818,6 +813,11 @@ 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);
+ createEReference(userEClass, USER__UNASSIGNED_ROLES);
userPasswordEClass = createEClass(USER_PASSWORD);
createEAttribute(userPasswordEClass, USER_PASSWORD__ENCRYPTED);
@@ -827,10 +827,10 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
createEAttribute(checkEClass, CHECK__PERMISSION);
classCheckEClass = createEClass(CLASS_CHECK);
- createEReference(classCheckEClass, CLASS_CHECK__CLASSES);
+ createEReference(classCheckEClass, CLASS_CHECK__APPLICABLE_CLASS);
packageCheckEClass = createEClass(PACKAGE_CHECK);
- createEReference(packageCheckEClass, PACKAGE_CHECK__PACKAGES);
+ createEReference(packageCheckEClass, PACKAGE_CHECK__APPLICABLE_PACKAGE);
resourceCheckEClass = createEClass(RESOURCE_CHECK);
createEAttribute(resourceCheckEClass, RESOURCE_CHECK__PATTERN);
@@ -941,34 +941,39 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
"name", null, 0, 1, Directory.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(roleEClass, Role.class, "Role", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
- initEReference(
- getRole_Assignees(),
- this.getAssignee(),
- this.getAssignee_Roles(),
- "assignees", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(
+ getRole_Id(),
+ theEcorePackage.getEString(),
+ "id", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getRole_Checks(),
this.getCheck(),
this.getCheck_Role(),
"checks", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getRole_Id(),
- theEcorePackage.getEString(),
- "id", null, 0, 1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(
+ getRole_Assignees(),
+ this.getAssignee(),
+ this.getAssignee_Roles(),
+ "assignees", null, 0, -1, Role.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(assigneeEClass, Assignee.class, "Assignee", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(
+ getAssignee_Id(),
+ theEcorePackage.getEString(),
+ "id", null, 0, 1, Assignee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(
getAssignee_Roles(),
this.getRole(),
this.getRole_Assignees(),
"roles", null, 0, -1, Assignee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
- initEAttribute(
- getAssignee_Id(),
- theEcorePackage.getEString(),
- "id", null, 0, 1, Assignee.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(groupEClass, Group.class, "Group", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
+ getGroup_Users(),
+ this.getUser(),
+ this.getUser_Groups(),
+ "users", 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$
+ initEReference(
getGroup_InheritedGroups(),
this.getGroup(),
this.getGroup_InheritingGroups(),
@@ -993,38 +998,8 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
this.getRole(),
null,
"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$
- initEReference(
- getGroup_Users(),
- this.getUser(),
- this.getUser_Groups(),
- "users", 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$
- initEReference(
- getUser_AllGroups(),
- this.getGroup(),
- null,
- "allGroups", 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_AllRoles(),
- this.getRole(),
- null,
- "allRoles", 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_AllChecks(),
- this.getCheck(),
- null,
- "allChecks", 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_UnassignedRoles(),
- this.getRole(),
- null,
- "unassignedRoles", 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(),
@@ -1058,6 +1033,31 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
this.getUserPassword(),
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,
+ "allGroups", 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_AllRoles(),
+ this.getRole(),
+ null,
+ "allRoles", 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_AllChecks(),
+ this.getCheck(),
+ null,
+ "allChecks", 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_UnassignedRoles(),
+ this.getRole(),
+ null,
+ "unassignedRoles", 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$
initEClass(userPasswordEClass, UserPassword.class,
"UserPassword", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
@@ -1080,18 +1080,18 @@ public class SecurityPackageImpl extends EPackageImpl implements SecurityPackage
initEClass(classCheckEClass, ClassCheck.class,
"ClassCheck", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
- getClassCheck_Classes(),
+ getClassCheck_ApplicableClass(),
theEcorePackage.getEClass(),
null,
- "classes", null, 1, -1, ClassCheck.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "applicableClass", null, 1, 1, ClassCheck.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(packageCheckEClass, PackageCheck.class,
"PackageCheck", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEReference(
- getPackageCheck_Packages(),
+ getPackageCheck_ApplicablePackage(),
theEcorePackage.getEPackage(),
null,
- "packages", null, 1, -1, PackageCheck.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ "applicablePackage", null, 1, 1, PackageCheck.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(resourceCheckEClass, ResourceCheck.class,
"ResourceCheck", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
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 b94c8f2171..77728c2005 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,11 +35,6 @@ 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#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>
- * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getUnassignedRoles <em>Unassigned Roles</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>
@@ -48,6 +43,11 @@ 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>
+ * <li>{@link org.eclipse.emf.cdo.security.impl.UserImpl#getUnassignedRoles <em>Unassigned Roles</em>}</li>
* </ul>
* </p>
*
@@ -137,7 +137,7 @@ public class UserImpl extends AssigneeImpl implements User
result.addAll(role.getChecks());
}
- return result.data();
+ return result.toArray();
}
};
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
index a68ac2f015..d973f30636 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/internal/security/SecurityManager.java
@@ -307,6 +307,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
protected Realm createRealm()
{
Realm realm = SecurityFactory.eINSTANCE.createRealm();
+ realm.setName("Security Realm");
// Create directories
@@ -331,6 +332,10 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
admin.setId("Administrator");
newUsers.add(admin);
+ UserPassword adminPassword = SecurityFactory.eINSTANCE.createUserPassword();
+ adminPassword.setEncrypted("0000");
+ admin.setPassword(adminPassword);
+
Group admins = SecurityFactory.eINSTANCE.createGroup();
admins.setId("Administrators");
admins.getUsers().add(admin);
@@ -343,11 +348,6 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
administration.getAssignees().add(admins);
newRoles.add(administration);
- ClassCheck check = SecurityFactory.eINSTANCE.createClassCheck();
- check.setPermission(Permission.WRITE);
- administration.getChecks().add(check);
- EList<EClass> classes = check.getClasses();
-
for (EClassifier eClassifier : SecurityPackage.eINSTANCE.getEClassifiers())
{
if (eClassifier instanceof EClass)
@@ -358,14 +358,17 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
continue;
}
- classes.add(eClass);
+ ClassCheck check = SecurityFactory.eINSTANCE.createClassCheck();
+ check.setPermission(Permission.WRITE);
+ administration.getChecks().add(check);
+ check.setApplicableClass(eClass);
}
}
return realm;
}
- protected CDOPermission getPermission(Permission permission)
+ protected CDOPermission convertPermission(Permission permission)
{
switch (permission)
{
@@ -383,7 +386,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
protected CDOPermission getPermission(CDORevision revision, CDORevisionProvider revisionProvider,
CDOBranchPoint securityContext, User user)
{
- CDOPermission result = getPermission(user.getDefaultPermission());
+ CDOPermission result = convertPermission(user.getDefaultPermission());
if (result == CDOPermission.WRITE)
{
return result;
@@ -391,7 +394,7 @@ public class SecurityManager extends Lifecycle implements InternalSecurityManage
for (Check check : user.getAllChecks())
{
- CDOPermission permission = getPermission(check.getPermission());
+ CDOPermission permission = convertPermission(check.getPermission());
if (permission.ordinal() <= result.ordinal())
{
// Avoid expensive calls to Check.isApplicable() if the permission wouldn't increase
diff --git a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
index c55284f2d9..4c75926a8f 100644
--- a/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
+++ b/plugins/org.eclipse.emf.cdo.server.security/src/org/eclipse/emf/cdo/server/spi/security/AnnotationHandler.java
@@ -106,14 +106,14 @@ public class AnnotationHandler implements InternalSecurityManager.CommitHandler
protected void handlePackagePermission(Realm realm, EPackage ePackage, String key, Permission permission)
{
EClass checkClass = SecurityPackage.Literals.PACKAGE_CHECK;
- EReference checkFeature = SecurityPackage.Literals.PACKAGE_CHECK__PACKAGES;
+ EReference checkFeature = SecurityPackage.Literals.PACKAGE_CHECK__APPLICABLE_PACKAGE;
handlePermission(realm, ePackage, key, permission, checkClass, checkFeature);
}
protected void handleClassPermission(Realm realm, EClass eClass, String key, Permission permission)
{
EClass checkClass = SecurityPackage.Literals.CLASS_CHECK;
- EReference checkFeature = SecurityPackage.Literals.CLASS_CHECK__CLASSES;
+ EReference checkFeature = SecurityPackage.Literals.CLASS_CHECK__APPLICABLE_CLASS;
handlePermission(realm, eClass, key, permission, checkClass, checkFeature);
}
@@ -136,10 +136,7 @@ public class AnnotationHandler implements InternalSecurityManager.CommitHandler
{
Check check = (Check)EcoreUtil.create(checkClass);
check.setPermission(permission);
-
- @SuppressWarnings("unchecked")
- EList<EModelElement> list = (EList<EModelElement>)check.eGet(checkFeature);
- list.add(modelElement);
+ check.eSet(checkFeature, modelElement);
Role role = RealmUtil.findRole(items, token);
if (role == null)
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
index b104432488..e7e2efd2af 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/ui/security/CredentialsDialog.java
@@ -1,76 +1,85 @@
-/*
- * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- */
-package org.eclipse.net4j.util.ui.security;
-
-import org.eclipse.net4j.util.internal.ui.bundle.OM;
-import org.eclipse.net4j.util.internal.ui.messages.Messages;
-import org.eclipse.net4j.util.security.IPasswordCredentials;
-import org.eclipse.net4j.util.security.PasswordCredentials;
-import org.eclipse.net4j.util.ui.UIUtil;
-import org.eclipse.net4j.util.ui.widgets.BaseDialog;
-
-import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.swt.widgets.Text;
-
-/**
- * @author Eike Stepper
- * @since 2.0
- */
-public class CredentialsDialog extends BaseDialog<Viewer>
-{
- private static final String TITLE = Messages.getString("CredentialsDialog_0"); //$NON-NLS-1$
-
- private static final String MESSAGE = Messages.getString("CredentialsDialog_1"); //$NON-NLS-1$
-
- private Text userIDControl;
-
- private Text passwordControl;
-
- private IPasswordCredentials credentials;
-
- public CredentialsDialog(Shell shell)
- {
- super(shell, DEFAULT_SHELL_STYLE | SWT.APPLICATION_MODAL, TITLE, MESSAGE, OM.Activator.INSTANCE.getDialogSettings());
- }
-
- public IPasswordCredentials getCredentials()
- {
- return credentials;
- }
-
- @Override
- protected void createUI(Composite parent)
- {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- composite.setLayoutData(UIUtil.createGridData());
-
- new Label(composite, SWT.NONE).setText(Messages.getString("CredentialsDialog_2")); //$NON-NLS-1$
- userIDControl = new Text(composite, SWT.BORDER);
-
- new Label(composite, SWT.NONE).setText(Messages.getString("CredentialsDialog_3")); //$NON-NLS-1$
- passwordControl = new Text(composite, SWT.BORDER | SWT.PASSWORD);
- }
-
- @Override
- protected void okPressed()
- {
- String userID = userIDControl.getText();
- String password = passwordControl.getText();
- credentials = new PasswordCredentials(userID, password.toCharArray());
- super.okPressed();
- }
-}
+/*
+ * Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Eike Stepper - initial API and implementation
+ */
+package org.eclipse.net4j.util.ui.security;
+
+import org.eclipse.net4j.util.internal.ui.bundle.OM;
+import org.eclipse.net4j.util.internal.ui.messages.Messages;
+import org.eclipse.net4j.util.security.IPasswordCredentials;
+import org.eclipse.net4j.util.security.PasswordCredentials;
+import org.eclipse.net4j.util.ui.UIUtil;
+import org.eclipse.net4j.util.ui.widgets.BaseDialog;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.Text;
+
+/**
+ * @author Eike Stepper
+ * @since 2.0
+ */
+public class CredentialsDialog extends BaseDialog<Viewer>
+{
+ private static final String TITLE = Messages.getString("CredentialsDialog_0"); //$NON-NLS-1$
+
+ private static final String MESSAGE = Messages.getString("CredentialsDialog_1"); //$NON-NLS-1$
+
+ private Text userIDControl;
+
+ private Text passwordControl;
+
+ private IPasswordCredentials credentials;
+
+ public CredentialsDialog(Shell shell)
+ {
+ super(shell, DEFAULT_SHELL_STYLE | SWT.APPLICATION_MODAL, TITLE, MESSAGE, OM.Activator.INSTANCE.getDialogSettings());
+ }
+
+ @Override
+ protected void configureShell(Shell newShell)
+ {
+ super.configureShell(newShell);
+ newShell.setSize(300, 220);
+ }
+
+ public IPasswordCredentials getCredentials()
+ {
+ return credentials;
+ }
+
+ @Override
+ protected void createUI(Composite parent)
+ {
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayoutData(UIUtil.createGridData());
+ composite.setLayout(new GridLayout(2, false));
+
+ new Label(composite, SWT.NONE).setText(Messages.getString("CredentialsDialog_2")); //$NON-NLS-1$
+ userIDControl = new Text(composite, SWT.BORDER);
+ userIDControl.setLayoutData(UIUtil.createGridData(true, false));
+
+ new Label(composite, SWT.NONE).setText(Messages.getString("CredentialsDialog_3")); //$NON-NLS-1$
+ passwordControl = new Text(composite, SWT.BORDER | SWT.PASSWORD);
+ passwordControl.setLayoutData(UIUtil.createGridData(true, false));
+ }
+
+ @Override
+ protected void okPressed()
+ {
+ String userID = userIDControl.getText();
+ String password = passwordControl.getText();
+ credentials = new PasswordCredentials(userID, password.toCharArray());
+ super.okPressed();
+ }
+}

Back to the top