RM-479 (Cannot edit custom metadata)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@53755 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2013-08-07 21:44:24 +00:00
parent 03932c2240
commit 6b87c6beed
2 changed files with 8 additions and 8 deletions

View File

@@ -122,10 +122,10 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
private static final String MSG_ERROR_SPLIT_ID = "rm.admin.error-split-id";
/** Constants */
public static final String RMC_CUSTOM_ASSOCS = RecordsManagementCustomModel.RM_CUSTOM_PREFIX + ":customAssocs";
public static final String RMC_CUSTOM_ASSOCS = RecordsManagementCustomModel.RM_CUSTOM_PREFIX + ":customAssocs";
private static final String CUSTOM_CONSTRAINT_TYPE = org.alfresco.module.org_alfresco_module_rm.caveat.RMListOfValuesConstraint.class.getName();
private static final String CAPATIBILITY_CUSTOM_CONTRAINT_TYPE = org.alfresco.module.org_alfresco_module_dod5015.caveat.RMListOfValuesConstraint.class.getName();
private static final NodeRef RM_CUSTOM_MODEL_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "records_management_custom_model");
private static final NodeRef RM_CUSTOM_MODEL_NODE_REF = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, "records_management_custom_model");
private static final String PARAM_ALLOWED_VALUES = "allowedValues";
private static final String PARAM_CASE_SENSITIVE = "caseSensitive";
private static final String PARAM_MATCH_LOGIC = "matchLogic";
@@ -816,8 +816,8 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
QName newPropQName = getQNameForClientId(newName);
if (newPropQName != null)
{
propDefn = dictionaryService.getProperty(newPropQName);
if (propDefn != null)
PropertyDefinition newPropDefn = dictionaryService.getProperty(newPropQName);
if (newPropDefn != null && propDefn.equals(newPropDefn) == false)
{
// The requested QName is already in use
String propIdAsString = newPropQName.toPrefixString(namespaceService);
@@ -1415,7 +1415,7 @@ public class RecordsManagementAdminServiceImpl implements RecordsManagementAdmin
}
String type = customConstraint.getType();
if (type == null ||
if (type == null ||
(type.equals(CUSTOM_CONSTRAINT_TYPE) == false &&
type.equals(CAPATIBILITY_CUSTOM_CONTRAINT_TYPE) == false))
{

View File

@@ -190,7 +190,7 @@ public class CustomPropertyDefinitionPut extends BaseCustomPropertyWebScript
return result;
}
@SuppressWarnings("unchecked")
protected Map<String, Serializable> getParamsFromUrlAndJson(WebScriptRequest req, JSONObject json)
throws JSONException
@@ -205,9 +205,9 @@ public class CustomPropertyDefinitionPut extends BaseCustomPropertyWebScript
params.put(PROP_ID, (Serializable)propId);
}
for (Iterator iter = json.keys(); iter.hasNext(); )
for (Iterator<String> iter = json.keys(); iter.hasNext(); )
{
String nextKeyString = (String)iter.next();
String nextKeyString = iter.next();
String nextValueString = null;
if (!json.isNull(nextKeyString))
{