Author: tolusha
Date: 2010-08-19 03:30:57 -0400 (Thu, 19 Aug 2010)
New Revision: 2946
Added:
jcr/branches/1.12.x/patch/EXOJCR-908/
jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch
Log:
EXOJCR-908: fox parsing permission value
Added: jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch
===================================================================
--- jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch (rev 0)
+++ jcr/branches/1.12.x/patch/EXOJCR-908/EXOJCR-908.patch 2010-08-19 07:30:57 UTC (rev
2946)
@@ -0,0 +1,47 @@
+Index:
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java
+===================================================================
+---
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java (revision
2944)
++++
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/value/PermissionValue.java (working
copy)
+@@ -18,7 +18,6 @@
+ */
+ package org.exoplatform.services.jcr.impl.core.value;
+
+-import org.exoplatform.services.jcr.access.AccessControlEntry;
+ import org.exoplatform.services.jcr.access.PermissionType;
+ import org.exoplatform.services.jcr.access.SystemIdentity;
+ import org.exoplatform.services.jcr.core.ExtendedPropertyType;
+@@ -43,6 +42,8 @@
+
+ private static final int TYPE = ExtendedPropertyType.PERMISSION;
+
++ private static final String IDENTITY_DELIMITER = " ";
++
+ private String identity;
+
+ private String permission;
+@@ -84,7 +85,7 @@
+
+ static public String[] parse(String pstring)
+ {
+- StringTokenizer parser = new StringTokenizer(pstring,
AccessControlEntry.DELIMITER);
++ StringTokenizer parser = new StringTokenizer(pstring, IDENTITY_DELIMITER);
+ String identityString = parser.nextToken();
+ String permissionString = parser.nextToken();
+
+@@ -112,6 +113,7 @@
+ /**
+ * {@inheritDoc}
+ */
++ @Override
+ protected String getInternalString() throws ValueFormatException
+ {
+ return asString(identity, permission);
+@@ -120,7 +122,7 @@
+ static protected String asString(String identity, String permission)
+ {
+ if (identity != null || permission != null) // SystemIdentity.ANY,
PermissionType.ALL
+- return (identity != null ? identity : SystemIdentity.ANY) +
AccessControlEntry.DELIMITER
++ return (identity != null ? identity : SystemIdentity.ANY) + IDENTITY_DELIMITER
+ + (permission != null ? permission : PermissionType.READ);
+ else
+ return "";
Show replies by date