You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2008/09/24 23:22:19 UTC
svn commit: r698741 [2/2] - in
/portals/jetspeed-2/portal/branches/security-refactoring:
components/jetspeed-security/src/main/java/org/apache/jetspeed/security/impl/
components/jetspeed-security/src/main/java/org/apache/jetspeed/security/spi/impl/
jet...
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
-org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh_TW.properties
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh_TW.properties?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh_TW.properties (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/exception/JetspeedExceptionMessages_zh_TW.properties Wed Sep 24 14:22:18 2008
@@ -18,9 +18,13 @@
org.apache.jetspeed.security.SecurityException.PRINCIPAL_IS_READ_ONLY = The principal {0} is read-only.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_UPDATE_FAILURE = Failed to update principal {0}.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_NOT_REMOVABLE = The principal {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.DEPENDENT_PRINCIPAL_EXISTS = The principal {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_REQUIRED = A {0} {1} association is required.
-org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A {0} {1} association is not allowed.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_READ_ONLY = The principal attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.ATTRIBUTE_IS_REQUIRED = The principal attribute {0} is required.
org.apache.jetspeed.security.SecurityException.ATTRIBUTES_ARE_READ_ONLY = The principal attributes are read only.
@@ -52,9 +56,13 @@
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_IS_READ_ONLY = The user {0} is read-only.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_UPDATE_FAILURE = Failed to update user {0}.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_NOT_REMOVABLE = The user {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.user.DEPENDENT_PRINCIPAL_EXISTS = The user {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_REQUIRED = A user {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A user {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from user {1} to another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to user {1} from another user.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.user.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_READ_ONLY = The user attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTE_IS_REQUIRED = The user attribute {0} is required.
org.apache.jetspeed.security.SecurityException.user.ATTRIBUTES_ARE_READ_ONLY = The user attributes are read only.
@@ -65,9 +73,13 @@
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_IS_READ_ONLY = The role {0} is read-only.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_UPDATE_FAILURE = Failed to update role {0}.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_NOT_REMOVABLE = The role {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.role.DEPENDENT_PRINCIPAL_EXISTS = The role {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_REQUIRED = A role {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A role {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from role {1} to another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to role {1} from another role.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.role.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_READ_ONLY = The role attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTE_IS_REQUIRED = The role attribute {0} is required.
org.apache.jetspeed.security.SecurityException.role.ATTRIBUTES_ARE_READ_ONLY = The role attributes are read only.
@@ -78,9 +90,13 @@
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_IS_READ_ONLY = The group {0} is read-only.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_UPDATE_FAILURE = Failed to update group {0}.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_NOT_REMOVABLE = The group {0} cannot be removed.
-org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more dependents.
+org.apache.jetspeed.security.SecurityException.group.DEPENDENT_PRINCIPAL_EXISTS = The group {0} has one or more required {1} {2} associations.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_REQUIRED = A group {0} {1} association is required.
org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_UNSUPPORTED = A group {0} {1} association is not supported.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR = Only one {0} association is allowed from principal {1} to another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT = Only one {0} association is allowed to principal {1} from another group.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = Only one {0} association is allowed from principal {1} to a {2}.
+org.apache.jetspeed.security.SecurityException.group.PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = Only one {0} association is allowed to principal {1} from a {2}.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_READ_ONLY = The group attribute {0} is read only.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTE_IS_REQUIRED = The group attribute {0} is required.
org.apache.jetspeed.security.SecurityException.group.ATTRIBUTES_ARE_READ_ONLY = The group attributes are read only.
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/JetspeedPrincipalAssociationType.java Wed Sep 24 14:22:18 2008
@@ -22,35 +22,92 @@
public interface JetspeedPrincipalAssociationType
{
/**
- * build-in supported @{link {@link #getAssociationName() associationName} "isMemberOf"
+ * build-in supported @{link {@link #getAssociationName() associationName} "isMemberOf"
+ * <p>
+ * This association type between two different {@link JetspeedPrincipalType}s represents
+ * an N to M relationship
+ * </p>
+ * <p>
+ * Configuration needed for this association type:
+ * </p>
+ * <ul>
+ * <li>required : false</li>
+ * <li>dependent: false</li>
+ * <li>singular : false</li>
+ * <li>dominant : false</li>
+ * </ul>
*/
String IS_MEMBER_OF = "isMemberOf"; // FROM node is member of TO node
/**
* build-in supported @{link {@link #getAssociationName() associationName} "isChildOf"
+ * <p>
+ * This association type between two equal {@link JetspeedPrincipalType}s represents
+ * a required from child to parent hierarchical relationship.
+ * </p>
+ * <p>
+ * Configuration needed for this association type:
+ * </p>
+ * <ul>
+ * <li>required : true</li>
+ * <li>dependent: true</li>
+ * <li>singular : true</li>
+ * <li>dominant : false</li>
+ * </ul>
*/
String IS_CHILD_OF = "isChildOf"; // FROM node is member of TO node
/**
* build-in supported @{link {@link #getAssociationName() associationName} "isA"
- *
- * This association type (between two equal {@link JetspeedPrincipalType}s) represents
+ * <p>
+ * This association type between two equal {@link JetspeedPrincipalType}s represents
* a Generalizing Hierarchical relationship where from <em>implies</em> to.
+ * </p>
+ * <p>
+ * Configuration needed for this association type:
+ * </p>
+ * <ul>
+ * <li>required : false</li>
+ * <li>dependent: true</li>
+ * <li>singular : true</li>
+ * <li>dominant : false</li>
+ * </ul>
*/
String IS_A = "isA"; // FROM node is a TO node: FROM node implies TO node
/**
* build-in supported @{link {@link #getAssociationName() associationName} "isPartOf"
- *
- * This association type (between two equal {@link JetspeedPrincipalType}s) represents
+ * <p>
+ * This association type between two equal {@link JetspeedPrincipalType}s represents
* a Aggregating Hierarchical relationship where to <em>implies</em> from.
+ * </p>
+ * <p>
+ * Configuration needed for this association type (same as {@link #IS_MEMBER_OF}):
+ * </p>
+ * <ul>
+ * <li>required : false</li>
+ * <li>dependent: false</li>
+ * <li>singular : false</li>
+ * <li>dominant : false</li>
+ * </ul>
*/
String IS_PART_OF = "isPartOf"; // FROM node is part of TO node: TO node implies FROM node
/**
* build-in supported @{link {@link #getAssociationName() associationName} "belongsTo"
- *
- * This association type represents a (possibly required) constraint where from may only belong to one to
+ * <p>
+ * This association type betweem two different {@link JetspeedPrincipalType}s represents
+ * a required relationship where from may only belong to one to
+ * </p>
+ * <p>
+ * Configuration needed for this association type:
+ * </p>
+ * <ul>
+ * <li>required : true</li>
+ * <li>dependent: true</li>
+ * <li>singular : true</li>
+ * <li>dominant : false</li>
+ * </ul>
*/
String BELONGS_TO = "belongsTo"; // FROM node is member of TO node: FROM node may only belong to one TO node
@@ -94,4 +151,10 @@
* True if the to principal can be associated to at most once.
*/
boolean isDominant();
+
+ /**
+ * True if this is an association between two different {@link JetspeedPrincipalType}s
+ * @return
+ */
+ boolean isMixedTypes();
}
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/SecurityException.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/SecurityException.java?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/SecurityException.java (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-api/src/main/java/org/apache/jetspeed/security/SecurityException.java Wed Sep 24 14:22:18 2008
@@ -45,11 +45,23 @@
public static final KeyedMessage PRINCIPAL_NOT_REMOVABLE = new KeyedMessage("The principal {0} cannot be removed.");
/** <p>Principal has one or more dependents. */
- public static final KeyedMessage DEPENDENT_PRINCIPAL_EXISTS = new KeyedMessage("The principal {0} has one or more dependents.");
+ public static final KeyedMessage DEPENDENT_PRINCIPAL_EXISTS = new KeyedMessage("The principal {0} has one or more required {1} {2} associations.");
/** <p>Principal association required exception message.</p> */
public static final KeyedMessage PRINCIPAL_ASSOCIATION_REQUIRED = new KeyedMessage("A {0} {1} association is required.");
+ /** <p>Principal association singular for same types exception message.</p> */
+ public static final KeyedMessage PRINCIPAL_ASSOCIATION_SINGULAR = new KeyedMessage("Only one {0} association is allowed from principal {1} to another {2}.");
+
+ /** <p>Principal association dominant for same types exception message.</p> */
+ public static final KeyedMessage PRINCIPAL_ASSOCIATION_DOMINANT = new KeyedMessage("Only one {0} association is allowed to principal {1} from another {2}.");
+
+ /** <p>Principal association singular for mixed types exception message.</p> */
+ public static final KeyedMessage PRINCIPAL_ASSOCIATION_SINGULAR_MIXED = new KeyedMessage("Only one {0} association is allowed from principal {1} to a {2}.");
+
+ /** <p>Principal association dominant for mixed types exception message.</p> */
+ public static final KeyedMessage PRINCIPAL_ASSOCIATION_DOMINANT_MIXED = new KeyedMessage("Only one {0} association is allowed to principal {1} from a {2}.");
+
/** <p>Principal association is not supported exception message.</p> */
public static final KeyedMessage PRINCIPAL_ASSOCIATION_UNSUPPORTED = new KeyedMessage("A {0} {1} association is not supported.");
Modified: portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml?rev=698741&r1=698740&r2=698741&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml (original)
+++ portals/jetspeed-2/portal/branches/security-refactoring/jetspeed-portal-resources/src/main/resources/assembly/security-managers.xml Wed Sep 24 14:22:18 2008
@@ -258,32 +258,57 @@
</bean>
<bean id="userIsMemberOfRoleAssociationHandler"
- class="org.apache.jetspeed.security.spi.impl.SimpleMemberOfPrincipalAssociationHandler">
+ class="org.apache.jetspeed.security.spi.impl.IsMemberOfPrincipalAssociationHandler">
<meta key="j2:cat" value="default,security" />
- <constructor-arg index="0" value="isMemberOf" />
- <constructor-arg index="1" ref="org.apache.jetspeed.security.UserManager" />
- <constructor-arg index="2" ref="org.apache.jetspeed.security.RoleManager" />
- <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.UserManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.RoleManager" />
+ <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
</bean>
<bean id="userIsMemberOfGroupAssociationHandler"
- class="org.apache.jetspeed.security.spi.impl.SimpleMemberOfPrincipalAssociationHandler">
+ class="org.apache.jetspeed.security.spi.impl.IsMemberOfPrincipalAssociationHandler">
<meta key="j2:cat" value="default,security" />
- <constructor-arg index="0" value="isMemberOf" />
- <constructor-arg index="1" ref="org.apache.jetspeed.security.UserManager" />
- <constructor-arg index="2" ref="org.apache.jetspeed.security.GroupManager" />
- <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.UserManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.GroupManager" />
+ <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
</bean>
<bean id="groupIsMemberOfRoleAssociationHandler"
- class="org.apache.jetspeed.security.spi.impl.SimpleMemberOfPrincipalAssociationHandler">
+ class="org.apache.jetspeed.security.spi.impl.IsMemberOfPrincipalAssociationHandler">
<meta key="j2:cat" value="default,security" />
- <constructor-arg index="0" value="isMemberOf" />
- <constructor-arg index="1" ref="org.apache.jetspeed.security.GroupManager" />
- <constructor-arg index="2" ref="org.apache.jetspeed.security.RoleManager" />
- <constructor-arg index="3" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.RoleManager" />
+ <constructor-arg index="2" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
</bean>
+ <bean id="roleIsARoleAssociationHandler"
+ class="org.apache.jetspeed.security.spi.impl.IsAPrincipalAssociationHandler">
+ <meta key="j2:cat" value="default,security" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.RoleManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ </bean>
+
+ <bean id="roleIsPartOfRoleAssociationHandler"
+ class="org.apache.jetspeed.security.spi.impl.IsPartOfPrincipalAssociationHandler">
+ <meta key="j2:cat" value="default,security" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.RoleManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ </bean>
+
+ <bean id="groupIsAGroupAssociationHandler"
+ class="org.apache.jetspeed.security.spi.impl.IsAPrincipalAssociationHandler">
+ <meta key="j2:cat" value="default,security" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ </bean>
+
+ <bean id="groupIsPartOfGroupAssociationHandler"
+ class="org.apache.jetspeed.security.spi.impl.IsPartOfPrincipalAssociationHandler">
+ <meta key="j2:cat" value="default,security" />
+ <constructor-arg index="0" ref="org.apache.jetspeed.security.GroupManager" />
+ <constructor-arg index="1" ref="org.apache.jetspeed.security.spi.JetspeedSecurityPersistenceManager" />
+ </bean>
+
<bean id="userSubjectRolesResolver" class="org.apache.jetspeed.security.spi.impl.UserSubjectPrincipalsResolverImpl">
<meta key="j2:cat" value="default,security" />
<constructor-arg index="0" ref="org.apache.jetspeed.security.UserManager" />
@@ -298,6 +323,26 @@
</property>
</bean>
</constructor-arg>
+ <constructor-arg index="3">
+ <list>
+ <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject">
+ <ref bean="roleIsARoleAssociationHandler" />
+ </property>
+ <property name="targetMethod">
+ <value>getAssociationType</value>
+ </property>
+ </bean>
+ <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject">
+ <ref bean="roleIsPartOfRoleAssociationHandler" />
+ </property>
+ <property name="targetMethod">
+ <value>getAssociationType</value>
+ </property>
+ </bean>
+ </list>
+ </constructor-arg>
</bean>
<bean id="userSubjectGroupsResolver"
@@ -315,6 +360,34 @@
</property>
</bean>
</constructor-arg>
+ <constructor-arg index="3">
+ <list>
+ <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject">
+ <ref bean="groupIsMemberOfRoleAssociationHandler" />
+ </property>
+ <property name="targetMethod">
+ <value>getAssociationType</value>
+ </property>
+ </bean>
+ <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject">
+ <ref bean="groupIsAGroupAssociationHandler" />
+ </property>
+ <property name="targetMethod">
+ <value>getAssociationType</value>
+ </property>
+ </bean>
+ <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
+ <property name="targetObject">
+ <ref bean="groupIsPartOfGroupAssociationHandler" />
+ </property>
+ <property name="targetMethod">
+ <value>getAssociationType</value>
+ </property>
+ </bean>
+ </list>
+ </constructor-arg>
</bean>
</beans>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org