From 6f1faab6f60b6c691c05a5629ff89497906e10c9 Mon Sep 17 00:00:00 2001
From: Eike Stepper
Date: Sat, 9 Jun 2012 13:04:57 +0200
Subject: [381472] Design a repository administration API
https://bugs.eclipse.org/bugs/show_bug.cgi?id=381472
---
.../icons/full/obj16/ClassCheck.gif | Bin 0 -> 206 bytes
.../icons/full/obj16/Container.gif | Bin 129 -> 0 bytes
.../icons/full/obj16/Directory.gif | Bin 129 -> 219 bytes
.../icons/full/obj16/Group.gif | Bin 129 -> 603 bytes
.../icons/full/obj16/PackageCheck.gif | Bin 0 -> 207 bytes
.../icons/full/obj16/Realm.gif | Bin 129 -> 239 bytes
.../icons/full/obj16/ResourceCheck.gif | Bin 0 -> 346 bytes
.../icons/full/obj16/Role.gif | Bin 129 -> 528 bytes
.../icons/full/obj16/SecurityRealm.gif | Bin 129 -> 0 bytes
.../icons/full/obj16/User.gif | Bin 129 -> 308 bytes
.../icons/full/obj16/UserLocked.gif | Bin 0 -> 313 bytes
.../icons/full/obj16/UserPassword.gif | Bin 129 -> 132 bytes
.../icons/full/ovr16/READ.gif | Bin 0 -> 143 bytes
.../icons/full/ovr16/WRITE.gif | Bin 0 -> 181 bytes
.../plugin.properties | 22 +-
.../cdo/security/provider/CheckItemProvider.java | 171 +++++++
.../security/provider/ClassCheckItemProvider.java | 146 ++++++
.../provider/PackageCheckItemProvider.java | 146 ++++++
.../cdo/security/provider/RealmItemProvider.java | 64 +++
.../provider/ResourceCheckItemProvider.java | 157 +++++++
.../cdo/security/provider/RoleItemProvider.java | 50 +-
.../SecurityItemProviderAdapterFactory.java | 81 ++++
.../model/security.ecore | 32 +-
.../model/security.ecorediag | 247 ++++++++--
.../src/org/eclipse/emf/cdo/security/Check.java | 85 ++++
.../org/eclipse/emf/cdo/security/ClassCheck.java | 42 ++
.../org/eclipse/emf/cdo/security/PackageCheck.java | 42 ++
.../org/eclipse/emf/cdo/security/Permission.java | 220 +++++++++
.../src/org/eclipse/emf/cdo/security/Realm.java | 68 +++
.../org/eclipse/emf/cdo/security/RealmUtil.java | 97 ++++
.../eclipse/emf/cdo/security/ResourceCheck.java | 49 ++
.../src/org/eclipse/emf/cdo/security/Role.java | 28 +-
.../eclipse/emf/cdo/security/SecurityFactory.java | 27 ++
.../eclipse/emf/cdo/security/SecurityPackage.java | 513 ++++++++++++++++++++-
.../eclipse/emf/cdo/security/impl/CheckImpl.java | 102 ++++
.../emf/cdo/security/impl/ClassCheckImpl.java | 58 +++
.../emf/cdo/security/impl/PackageCheckImpl.java | 59 +++
.../eclipse/emf/cdo/security/impl/RealmImpl.java | 139 ++++++
.../emf/cdo/security/impl/ResourceCheckImpl.java | 66 +++
.../eclipse/emf/cdo/security/impl/RoleImpl.java | 18 +-
.../emf/cdo/security/impl/SecurityFactoryImpl.java | 102 ++++
.../emf/cdo/security/impl/SecurityPackageImpl.java | 280 ++++++++++-
.../cdo/security/util/SecurityAdapterFactory.java | 88 ++++
.../emf/cdo/security/util/SecuritySwitch.java | 106 +++++
.../server/internal/security/SecurityManager.java | 31 +-
.../icons/full/obj16/buddies.gif | Bin 603 -> 0 bytes
.../icons/full/obj16/buddy.gif | Bin 308 -> 0 bytes
.../icons/full/obj16/buddy_disabled.gif | Bin 313 -> 0 bytes
.../icons/full/obj16/folder.gif | Bin 219 -> 0 bytes
49 files changed, 3232 insertions(+), 104 deletions(-)
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif
delete mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Container.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif
delete mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/SecurityRealm.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserLocked.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/READ.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/WRITE.gif
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ClassCheckItemProvider.java
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/PackageCheckItemProvider.java
create mode 100644 plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/ResourceCheckItemProvider.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Check.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/PackageCheck.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/Permission.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ResourceCheck.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/CheckImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ClassCheckImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/PackageCheckImpl.java
create mode 100644 plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/ResourceCheckImpl.java
delete mode 100644 plugins/org.eclipse.net4j.ui.shared/icons/full/obj16/buddies.gif
delete mode 100644 plugins/org.eclipse.net4j.ui.shared/icons/full/obj16/buddy.gif
delete mode 100644 plugins/org.eclipse.net4j.ui.shared/icons/full/obj16/buddy_disabled.gif
delete mode 100644 plugins/org.eclipse.net4j.ui.shared/icons/full/obj16/folder.gif
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif
new file mode 100644
index 0000000000..2b8da630d8
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ClassCheck.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Container.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Container.gif
deleted file mode 100644
index c00aedf413..0000000000
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Container.gif and /dev/null differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Directory.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Directory.gif
index 134551bff7..42e027c933 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Directory.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Directory.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Group.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Group.gif
index 90d10f9470..952ed084bd 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Group.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Group.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif
new file mode 100644
index 0000000000..30c5c10cc4
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/PackageCheck.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Realm.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Realm.gif
index 33a997a160..8e3d48a637 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Realm.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Realm.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif
new file mode 100644
index 0000000000..27c7cbbe48
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/ResourceCheck.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Role.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Role.gif
index be22463d29..daa3652e9b 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Role.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/Role.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/SecurityRealm.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/SecurityRealm.gif
deleted file mode 100644
index 14af8aaee9..0000000000
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/SecurityRealm.gif and /dev/null differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/User.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/User.gif
index 48e3cf2268..5eed04350e 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/User.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/User.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserLocked.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserLocked.gif
new file mode 100644
index 0000000000..c684f405b5
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserLocked.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserPassword.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserPassword.gif
index 2124f3e3ab..c6021728de 100644
Binary files a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserPassword.gif and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/obj16/UserPassword.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/READ.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/READ.gif
new file mode 100644
index 0000000000..94db8466f1
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/READ.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/WRITE.gif b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/WRITE.gif
new file mode 100644
index 0000000000..b23966fbe9
Binary files /dev/null and b/plugins/org.eclipse.emf.cdo.security.edit/icons/full/ovr16/WRITE.gif differ
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
index ffc4ef785c..2e78589916 100644
--- a/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
+++ b/plugins/org.eclipse.emf.cdo.security.edit/plugin.properties
@@ -37,15 +37,15 @@ _UI_SecurityRealm_name_feature = Name
_UI_Container_items_feature = Items
_UI_Container_name_feature = Name
_UI_Role_assignees_feature = Assignees
-_UI_Role_id_feature = Id
+_UI_Role_id_feature = ID
_UI_Role_type_feature = Type
_UI_Assignee_roles_feature = Roles
-_UI_Assignee_id_feature = Id
+_UI_Assignee_id_feature = ID
_UI_Group_users_feature = Users
_UI_User_groups_feature = Groups
_UI_User_firstName_feature = First Name
_UI_User_lastName_feature = Last Name
-_UI_User_email_feature = Email
+_UI_User_email_feature = E-Mail
_UI_User_locked_feature = Locked
_UI_User_password_feature = Password
_UI_UserPassword_encrypted_feature = Encrypted
@@ -65,3 +65,19 @@ _UI_User_allGroups_feature = All Groups
_UI_User_allRoles_feature = All Roles
_UI_User_label_feature = Label
_UI_Group_allInheritingGroups_feature = All Inheriting Groups
+_UI_Check_type = Check
+_UI_ClassCheck_type = Class Check
+_UI_PackageCheck_type = Package Check
+_UI_ResourceCheck_type = Resource Check
+_UI_Role_checks_feature = Checks
+_UI_Check_role_feature = Role
+_UI_Check_permission_feature = Permission
+_UI_ClassCheck_classes_feature = Classes
+_UI_PackageCheck_packages_feature = Packages
+_UI_ResourceCheck_pattern_feature = Pattern
+_UI_Permission_READ_literal = READ
+_UI_Permission_WRITE_literal = WRITE
+_UI_Realm_allUsers_feature = All Users
+_UI_Realm_allGroups_feature = All Groups
+_UI_Realm_allRoles_feature = All Roles
+_UI_Realm_allChecks_feature = All Checks
diff --git a/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java
new file mode 100644
index 0000000000..e48ff137b6
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.security.edit/src/org/eclipse/emf/cdo/security/provider/CheckItemProvider.java
@@ -0,0 +1,171 @@
+/**
+ */
+package org.eclipse.emf.cdo.security.provider;
+
+import org.eclipse.emf.cdo.security.Check;
+import org.eclipse.emf.cdo.security.Permission;
+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.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;
+import org.eclipse.emf.edit.provider.IItemFontProvider;
+import org.eclipse.emf.edit.provider.IItemLabelProvider;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.IItemPropertySource;
+import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
+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;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.emf.cdo.security.Check} object.
+ *
+ *
+ * @generated
+ */
+public class CheckItemProvider extends ItemProviderAdapter implements IEditingDomainItemProvider,
+ IStructuredItemContentProvider, ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource,
+ ITableItemLabelProvider, ITableItemColorProvider, ITableItemFontProvider, IItemColorProvider, IItemFontProvider
+{
+ /**
+ * This constructs an instance from a factory and a notifier.
+ *
+ *
+ * @generated
+ */
+ public CheckItemProvider(AdapterFactory adapterFactory)
+ {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public List getPropertyDescriptors(Object object)
+ {
+ if (itemPropertyDescriptors == null)
+ {
+ super.getPropertyDescriptors(object);
+
+ addPermissionPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Permission feature.
+ *
+ *
+ * @generated
+ */
+ protected void addPermissionPropertyDescriptor(Object object)
+ {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(
+ ((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Check_permission_feature"), //$NON-NLS-1$
+ getString("_UI_PropertyDescriptor_description", "_UI_Check_permission_feature", "_UI_Check_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ SecurityPackage.Literals.CHECK__PERMISSION, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null, null));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean hasChildren(Object object)
+ {
+ return hasChildren(object, true);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage()
+ {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getText(Object object)
+ {
+ Permission labelValue = ((Check)object).getPermission();
+ String label = labelValue == null ? null : labelValue.toString();
+ return label == null || label.length() == 0 ? getString("_UI_Check_type") : //$NON-NLS-1$
+ getString("_UI_Check_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification)
+ {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(Check.class))
+ {
+ case SecurityPackage.CHECK__PERMISSION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection
+ *
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getCheck()
+ * @model abstract="true"
+ * @extends CDOObject
+ * @generated
+ */
+public interface Check extends CDOObject
+{
+ /**
+ * Returns the value of the 'Role' container reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.security.Role#getChecks Checks}'.
+ *
+ *
+ * If the meaning of the 'Role' container reference isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Role' container reference.
+ * @see #setRole(Role)
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getCheck_Role()
+ * @see org.eclipse.emf.cdo.security.Role#getChecks
+ * @model opposite="checks" required="true" transient="false"
+ * @generated
+ */
+ Role getRole();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.security.Check#getRole Role}' container reference.
+ *
+ *
+ * @param value the new value of the 'Role' container reference.
+ * @see #getRole()
+ * @generated
+ */
+ void setRole(Role value);
+
+ /**
+ * Returns the value of the 'Permission' attribute.
+ * The default value is "WRITE".
+ * The literals are from the enumeration {@link org.eclipse.emf.cdo.security.Permission}.
+ *
+ *
+ * If the meaning of the 'Permission' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Permission' attribute.
+ * @see org.eclipse.emf.cdo.security.Permission
+ * @see #setPermission(Permission)
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getCheck_Permission()
+ * @model default="WRITE"
+ * @generated
+ */
+ Permission getPermission();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.cdo.security.Check#getPermission Permission}' attribute.
+ *
+ *
+ * @param value the new value of the 'Permission' attribute.
+ * @see org.eclipse.emf.cdo.security.Permission
+ * @see #getPermission()
+ * @generated
+ */
+ void setPermission(Permission value);
+
+} // Check
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
new file mode 100644
index 0000000000..a79877c3ad
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ClassCheck.java
@@ -0,0 +1,42 @@
+/**
+ */
+package org.eclipse.emf.cdo.security;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ *
+ * A representation of the model object 'Class Check'.
+ *
+ *
+ *
*
@@ -47,6 +51,70 @@ public interface Realm extends SecurityElement
*/
EList getItems();
+ /**
+ * Returns the value of the 'All Users' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.security.User}.
+ *
+ *
+ * If the meaning of the 'All Users' reference list isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'All Users' reference list.
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getRealm_AllUsers()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EList getAllUsers();
+
+ /**
+ * Returns the value of the 'All Groups' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.security.Group}.
+ *
+ *
+ * If the meaning of the 'All Groups' reference list isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'All Groups' reference list.
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getRealm_AllGroups()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EList getAllGroups();
+
+ /**
+ * Returns the value of the 'All Roles' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.security.Role}.
+ *
+ *
+ * If the meaning of the 'All Roles' reference list isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'All Roles' reference list.
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getRealm_AllRoles()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EList getAllRoles();
+
+ /**
+ * Returns the value of the 'All Checks' reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.security.Check}.
+ *
+ *
+ * If the meaning of the 'All Checks' reference list isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'All Checks' reference list.
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getRealm_AllChecks()
+ * @model transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EList getAllChecks();
+
/**
* Returns the value of the 'Name' attribute.
*
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/RealmUtil.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/RealmUtil.java
index 71adfd8190..593dc4aece 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/RealmUtil.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/RealmUtil.java
@@ -12,6 +12,7 @@ package org.eclipse.emf.cdo.security;
import org.eclipse.net4j.util.ObjectUtil;
+import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
/**
@@ -102,4 +103,100 @@ public final class RealmUtil
return null;
}
+
+ public static BasicEList allUsers(EList items)
+ {
+ BasicEList result = new BasicEList();
+ allUsers(items, result);
+ return result;
+ }
+
+ public static BasicEList allGroups(EList items)
+ {
+ BasicEList result = new BasicEList();
+ allGroups(items, result);
+ return result;
+ }
+
+ public static BasicEList allRoles(EList items)
+ {
+ BasicEList result = new BasicEList();
+ allRoles(items, result);
+ return result;
+ }
+
+ public static BasicEList allChecks(EList items)
+ {
+ BasicEList result = new BasicEList();
+ allChecks(items, result);
+ return result;
+ }
+
+ private static void allUsers(EList items, EList result)
+ {
+ for (SecurityItem item : items)
+ {
+ if (item instanceof User)
+ {
+ User user = (User)item;
+ result.add(user);
+ }
+ else if (item instanceof Directory)
+ {
+ Directory directory = (Directory)item;
+ allUsers(directory.getItems(), result);
+ }
+ }
+ }
+
+ private static void allGroups(EList items, EList result)
+ {
+ for (SecurityItem item : items)
+ {
+ if (item instanceof Group)
+ {
+ Group group = (Group)item;
+ result.add(group);
+ }
+ else if (item instanceof Directory)
+ {
+ Directory directory = (Directory)item;
+ allGroups(directory.getItems(), result);
+ }
+ }
+ }
+
+ private static void allRoles(EList items, EList result)
+ {
+ for (SecurityItem item : items)
+ {
+ if (item instanceof Role)
+ {
+ Role role = (Role)item;
+ result.add(role);
+ }
+ else if (item instanceof Directory)
+ {
+ Directory directory = (Directory)item;
+ allRoles(directory.getItems(), result);
+ }
+ }
+ }
+
+ private static void allChecks(EList items, EList result)
+ {
+ for (SecurityItem item : items)
+ {
+ if (item instanceof Role)
+ {
+ Role role = (Role)item;
+ result.addAll(role.getChecks());
+ }
+ else if (item instanceof Directory)
+ {
+ Directory directory = (Directory)item;
+ allChecks(directory.getItems(), result);
+ }
+ }
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ResourceCheck.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ResourceCheck.java
new file mode 100644
index 0000000000..d15808783f
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/ResourceCheck.java
@@ -0,0 +1,49 @@
+/**
+ */
+package org.eclipse.emf.cdo.security;
+
+/**
+ *
+ * A representation of the model object 'Resource Check'.
+ *
+ *
+ *
*
*
@@ -77,29 +77,21 @@ public interface Role extends SecurityItem
void setId(String value);
/**
- * Returns the value of the 'Type' attribute.
+ * Returns the value of the 'Checks' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.cdo.security.Check}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.cdo.security.Check#getRole Role}'.
*
*
- * If the meaning of the 'Type' attribute isn't clear,
+ * If the meaning of the 'Checks' containment reference list isn't clear,
* there really should be more of a description here...
*
*
- * @return the value of the 'Type' attribute.
- * @see #setType(String)
- * @see org.eclipse.emf.cdo.security.SecurityPackage#getRole_Type()
- * @model
- * @generated
- */
- String getType();
-
- /**
- * Sets the value of the '{@link org.eclipse.emf.cdo.security.Role#getType Type}' attribute.
- *
- *
- * @param value the new value of the 'Type' attribute.
- * @see #getType()
+ * @return the value of the 'Checks' containment reference list.
+ * @see org.eclipse.emf.cdo.security.SecurityPackage#getRole_Checks()
+ * @see org.eclipse.emf.cdo.security.Check#getRole
+ * @model opposite="role" containment="true"
* @generated
*/
- void setType(String value);
+ EList getChecks();
} // Role
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityFactory.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityFactory.java
index 78297dda13..fbc1a0519b 100644
--- a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityFactory.java
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/SecurityFactory.java
@@ -84,6 +84,33 @@ public interface SecurityFactory extends EFactory
*/
UserPassword createUserPassword();
+ /**
+ * Returns a new object of class 'Class Check'.
+ *
+ *
+ * @return a new object of class 'Class Check'.
+ * @generated
+ */
+ ClassCheck createClassCheck();
+
+ /**
+ * Returns a new object of class 'Package Check'.
+ *
+ *
+ * @return a new object of class 'Package Check'.
+ * @generated
+ */
+ PackageCheck createPackageCheck();
+
+ /**
+ * Returns a new object of class 'Resource Check'.
+ *
+ *
+ * @return a new object of class 'Resource Check'.
+ * @generated
+ */
+ ResourceCheck createResourceCheck();
+
/**
* Returns the package supported by this factory.
*
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 2acaed64c6..44bd901a24 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
@@ -14,6 +14,7 @@ import org.eclipse.emf.cdo.etypes.EtypesPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -160,6 +161,42 @@ public interface SecurityPackage extends EPackage
*/
int REALM__ITEMS = SECURITY_ELEMENT_FEATURE_COUNT + 0;
+ /**
+ * The feature id for the 'All Users' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int REALM__ALL_USERS = SECURITY_ELEMENT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the 'All Groups' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int REALM__ALL_GROUPS = SECURITY_ELEMENT_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the 'All Roles' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int REALM__ALL_ROLES = SECURITY_ELEMENT_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the 'All Checks' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int REALM__ALL_CHECKS = SECURITY_ELEMENT_FEATURE_COUNT + 4;
+
/**
* The feature id for the 'Name' attribute.
*
@@ -167,7 +204,7 @@ public interface SecurityPackage extends EPackage
* @generated
* @ordered
*/
- int REALM__NAME = SECURITY_ELEMENT_FEATURE_COUNT + 1;
+ int REALM__NAME = SECURITY_ELEMENT_FEATURE_COUNT + 5;
/**
* The number of structural features of the 'Realm' class.
@@ -176,7 +213,7 @@ public interface SecurityPackage extends EPackage
* @generated
* @ordered
*/
- int REALM_FEATURE_COUNT = SECURITY_ELEMENT_FEATURE_COUNT + 2;
+ int REALM_FEATURE_COUNT = SECURITY_ELEMENT_FEATURE_COUNT + 6;
/**
* The feature id for the 'Annotations' containment reference list.
@@ -252,13 +289,13 @@ public interface SecurityPackage extends EPackage
int ROLE__ID = SECURITY_ITEM_FEATURE_COUNT + 1;
/**
- * The feature id for the 'Type' attribute.
+ * The feature id for the 'Checks' containment reference list.
*
*
* @generated
* @ordered
*/
- int ROLE__TYPE = SECURITY_ITEM_FEATURE_COUNT + 2;
+ int ROLE__CHECKS = SECURITY_ITEM_FEATURE_COUNT + 2;
/**
* The number of structural features of the 'Role' class.
@@ -570,6 +607,191 @@ public interface SecurityPackage extends EPackage
*/
int USER_PASSWORD_FEATURE_COUNT = 1;
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.security.impl.CheckImpl Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.CheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getCheck()
+ * @generated
+ */
+ int CHECK = 9;
+
+ /**
+ * The feature id for the 'Role' container reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CHECK__ROLE = 0;
+
+ /**
+ * The feature id for the 'Permission' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CHECK__PERMISSION = 1;
+
+ /**
+ * The number of structural features of the 'Check' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CHECK_FEATURE_COUNT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.security.impl.ClassCheckImpl Class Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.ClassCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getClassCheck()
+ * @generated
+ */
+ int CLASS_CHECK = 10;
+
+ /**
+ * The feature id for the 'Role' container reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CLASS_CHECK__ROLE = CHECK__ROLE;
+
+ /**
+ * The feature id for the 'Permission' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CLASS_CHECK__PERMISSION = CHECK__PERMISSION;
+
+ /**
+ * The feature id for the 'Classes' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CLASS_CHECK__CLASSES = CHECK_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the 'Class Check' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CLASS_CHECK_FEATURE_COUNT = CHECK_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.security.impl.PackageCheckImpl Package Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.PackageCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getPackageCheck()
+ * @generated
+ */
+ int PACKAGE_CHECK = 11;
+
+ /**
+ * The feature id for the 'Role' container reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGE_CHECK__ROLE = CHECK__ROLE;
+
+ /**
+ * The feature id for the 'Permission' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGE_CHECK__PERMISSION = CHECK__PERMISSION;
+
+ /**
+ * The feature id for the 'Packages' reference list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGE_CHECK__PACKAGES = CHECK_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the 'Package Check' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int PACKAGE_CHECK_FEATURE_COUNT = CHECK_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.security.impl.ResourceCheckImpl Resource Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.ResourceCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getResourceCheck()
+ * @generated
+ */
+ int RESOURCE_CHECK = 12;
+
+ /**
+ * The feature id for the 'Role' container reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_CHECK__ROLE = CHECK__ROLE;
+
+ /**
+ * The feature id for the 'Permission' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_CHECK__PERMISSION = CHECK__PERMISSION;
+
+ /**
+ * The feature id for the 'Pattern' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_CHECK__PATTERN = CHECK_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the 'Resource Check' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RESOURCE_CHECK_FEATURE_COUNT = CHECK_FEATURE_COUNT + 1;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.cdo.security.Permission Permission}' enum.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.Permission
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getPermission()
+ * @generated
+ */
+ int PERMISSION = 13;
+
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.security.SecurityElement Element}'.
*
@@ -601,6 +823,50 @@ public interface SecurityPackage extends EPackage
*/
EReference getRealm_Items();
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.Realm#getAllUsers All Users}'.
+ *
+ *
+ * @return the meta object for the reference list 'All Users'.
+ * @see org.eclipse.emf.cdo.security.Realm#getAllUsers()
+ * @see #getRealm()
+ * @generated
+ */
+ EReference getRealm_AllUsers();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.Realm#getAllGroups All Groups}'.
+ *
+ *
+ * @return the meta object for the reference list 'All Groups'.
+ * @see org.eclipse.emf.cdo.security.Realm#getAllGroups()
+ * @see #getRealm()
+ * @generated
+ */
+ EReference getRealm_AllGroups();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.Realm#getAllRoles All Roles}'.
+ *
+ *
+ * @return the meta object for the reference list 'All Roles'.
+ * @see org.eclipse.emf.cdo.security.Realm#getAllRoles()
+ * @see #getRealm()
+ * @generated
+ */
+ EReference getRealm_AllRoles();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.Realm#getAllChecks All Checks}'.
+ *
+ *
+ * @return the meta object for the reference list 'All Checks'.
+ * @see org.eclipse.emf.cdo.security.Realm#getAllChecks()
+ * @see #getRealm()
+ * @generated
+ */
+ EReference getRealm_AllChecks();
+
/**
* Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.security.Realm#getName Name}'.
*
@@ -687,15 +953,15 @@ public interface SecurityPackage extends EPackage
EAttribute getRole_Id();
/**
- * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.security.Role#getType Type}'.
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.cdo.security.Role#getChecks Checks}'.
*
*
- * @return the meta object for the attribute 'Type'.
- * @see org.eclipse.emf.cdo.security.Role#getType()
+ * @return the meta object for the containment reference list 'Checks'.
+ * @see org.eclipse.emf.cdo.security.Role#getChecks()
* @see #getRole()
* @generated
*/
- EAttribute getRole_Type();
+ EReference getRole_Checks();
/**
* Returns the meta object for class '{@link org.eclipse.emf.cdo.security.Assignee Assignee}'.
@@ -935,6 +1201,111 @@ public interface SecurityPackage extends EPackage
*/
EAttribute getUserPassword_Encrypted();
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.security.Check Check}'.
+ *
+ *
+ * @return the meta object for class 'Check'.
+ * @see org.eclipse.emf.cdo.security.Check
+ * @generated
+ */
+ EClass getCheck();
+
+ /**
+ * Returns the meta object for the container reference '{@link org.eclipse.emf.cdo.security.Check#getRole Role}'.
+ *
+ *
+ * @return the meta object for the container reference 'Role'.
+ * @see org.eclipse.emf.cdo.security.Check#getRole()
+ * @see #getCheck()
+ * @generated
+ */
+ EReference getCheck_Role();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.security.Check#getPermission Permission}'.
+ *
+ *
+ * @return the meta object for the attribute 'Permission'.
+ * @see org.eclipse.emf.cdo.security.Check#getPermission()
+ * @see #getCheck()
+ * @generated
+ */
+ EAttribute getCheck_Permission();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.security.ClassCheck Class Check}'.
+ *
+ *
+ * @return the meta object for class 'Class Check'.
+ * @see org.eclipse.emf.cdo.security.ClassCheck
+ * @generated
+ */
+ EClass getClassCheck();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.ClassCheck#getClasses Classes}'.
+ *
+ *
+ * @return the meta object for the reference list 'Classes'.
+ * @see org.eclipse.emf.cdo.security.ClassCheck#getClasses()
+ * @see #getClassCheck()
+ * @generated
+ */
+ EReference getClassCheck_Classes();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.security.PackageCheck Package Check}'.
+ *
+ *
+ * @return the meta object for class 'Package Check'.
+ * @see org.eclipse.emf.cdo.security.PackageCheck
+ * @generated
+ */
+ EClass getPackageCheck();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.cdo.security.PackageCheck#getPackages Packages}'.
+ *
+ *
+ * @return the meta object for the reference list 'Packages'.
+ * @see org.eclipse.emf.cdo.security.PackageCheck#getPackages()
+ * @see #getPackageCheck()
+ * @generated
+ */
+ EReference getPackageCheck_Packages();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.cdo.security.ResourceCheck Resource Check}'.
+ *
+ *
+ * @return the meta object for class 'Resource Check'.
+ * @see org.eclipse.emf.cdo.security.ResourceCheck
+ * @generated
+ */
+ EClass getResourceCheck();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.emf.cdo.security.ResourceCheck#getPattern Pattern}'.
+ *
+ *
+ * @return the meta object for the attribute 'Pattern'.
+ * @see org.eclipse.emf.cdo.security.ResourceCheck#getPattern()
+ * @see #getResourceCheck()
+ * @generated
+ */
+ EAttribute getResourceCheck_Pattern();
+
+ /**
+ * Returns the meta object for enum '{@link org.eclipse.emf.cdo.security.Permission Permission}'.
+ *
+ *
+ * @return the meta object for enum 'Permission'.
+ * @see org.eclipse.emf.cdo.security.Permission
+ * @generated
+ */
+ EEnum getPermission();
+
/**
* Returns the factory that creates the instances of the model.
*
@@ -986,6 +1357,38 @@ public interface SecurityPackage extends EPackage
*/
EReference REALM__ITEMS = eINSTANCE.getRealm_Items();
+ /**
+ * The meta object literal for the 'All Users' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference REALM__ALL_USERS = eINSTANCE.getRealm_AllUsers();
+
+ /**
+ * The meta object literal for the 'All Groups' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference REALM__ALL_GROUPS = eINSTANCE.getRealm_AllGroups();
+
+ /**
+ * The meta object literal for the 'All Roles' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference REALM__ALL_ROLES = eINSTANCE.getRealm_AllRoles();
+
+ /**
+ * The meta object literal for the 'All Checks' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference REALM__ALL_CHECKS = eINSTANCE.getRealm_AllChecks();
+
/**
* The meta object literal for the 'Name' attribute feature.
*
@@ -1057,12 +1460,12 @@ public interface SecurityPackage extends EPackage
EAttribute ROLE__ID = eINSTANCE.getRole_Id();
/**
- * The meta object literal for the 'Type' attribute feature.
+ * The meta object literal for the 'Checks' containment reference list feature.
*
*
* @generated
*/
- EAttribute ROLE__TYPE = eINSTANCE.getRole_Type();
+ EReference ROLE__CHECKS = eINSTANCE.getRole_Checks();
/**
* The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.AssigneeImpl Assignee}' class.
@@ -1248,6 +1651,96 @@ public interface SecurityPackage extends EPackage
*/
EAttribute USER_PASSWORD__ENCRYPTED = eINSTANCE.getUserPassword_Encrypted();
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.CheckImpl Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.CheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getCheck()
+ * @generated
+ */
+ EClass CHECK = eINSTANCE.getCheck();
+
+ /**
+ * The meta object literal for the 'Role' container reference feature.
+ *
+ *
+ * @generated
+ */
+ EReference CHECK__ROLE = eINSTANCE.getCheck_Role();
+
+ /**
+ * The meta object literal for the 'Permission' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute CHECK__PERMISSION = eINSTANCE.getCheck_Permission();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.ClassCheckImpl Class Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.ClassCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getClassCheck()
+ * @generated
+ */
+ EClass CLASS_CHECK = eINSTANCE.getClassCheck();
+
+ /**
+ * The meta object literal for the 'Classes' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference CLASS_CHECK__CLASSES = eINSTANCE.getClassCheck_Classes();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.PackageCheckImpl Package Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.PackageCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getPackageCheck()
+ * @generated
+ */
+ EClass PACKAGE_CHECK = eINSTANCE.getPackageCheck();
+
+ /**
+ * The meta object literal for the 'Packages' reference list feature.
+ *
+ *
+ * @generated
+ */
+ EReference PACKAGE_CHECK__PACKAGES = eINSTANCE.getPackageCheck_Packages();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.security.impl.ResourceCheckImpl Resource Check}' class.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.impl.ResourceCheckImpl
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getResourceCheck()
+ * @generated
+ */
+ EClass RESOURCE_CHECK = eINSTANCE.getResourceCheck();
+
+ /**
+ * The meta object literal for the 'Pattern' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute RESOURCE_CHECK__PATTERN = eINSTANCE.getResourceCheck_Pattern();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.cdo.security.Permission Permission}' enum.
+ *
+ *
+ * @see org.eclipse.emf.cdo.security.Permission
+ * @see org.eclipse.emf.cdo.security.impl.SecurityPackageImpl#getPermission()
+ * @generated
+ */
+ EEnum PERMISSION = eINSTANCE.getPermission();
+
}
} // SecurityPackage
diff --git a/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/CheckImpl.java b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/CheckImpl.java
new file mode 100644
index 0000000000..641b0eab43
--- /dev/null
+++ b/plugins/org.eclipse.emf.cdo.security/src/org/eclipse/emf/cdo/security/impl/CheckImpl.java
@@ -0,0 +1,102 @@
+/**
+ */
+package org.eclipse.emf.cdo.security.impl;
+
+import org.eclipse.emf.cdo.security.Check;
+import org.eclipse.emf.cdo.security.Permission;
+import org.eclipse.emf.cdo.security.Role;
+import org.eclipse.emf.cdo.security.SecurityPackage;
+
+import org.eclipse.emf.internal.cdo.CDOObjectImpl;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ *
+ * An implementation of the model object 'Check'.
+ *
+ *