CMISScope enum now consistent with all other CMIS enums

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13811 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-04-02 14:20:13 +00:00
parent 440af3f96c
commit b19a68fa34
2 changed files with 24 additions and 32 deletions

View File

@@ -234,7 +234,7 @@ public class CMISMapping implements InitializingBean
}
// Alfresco type id
CMISScope scope = CMISScope.toScope(typeId.charAt(0));
CMISScope scope = (CMISScope)CMISScope.FACTORY.fromLabel(typeId.substring(0, 1));
if (scope == null)
{
throw new AlfrescoRuntimeException("Malformed type id '" + typeId + "'; discriminator " + typeId.charAt(0) + " unknown");
@@ -257,7 +257,7 @@ public class CMISMapping implements InitializingBean
if (typeId == null)
{
StringBuilder builder = new StringBuilder(128);
builder.append(scope.discriminator());
builder.append(scope.getLabel());
builder.append("/");
builder.append(buildPrefixEncodedString(typeQName, false));
return new CMISTypeId(scope, builder.toString(), typeQName);