mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-492: RMMetaDataGet: Namespace prefix Alfresco is not mapped to a namespace URI
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/BRANCHES/V2.0-BUG-FIX@41263 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -53,6 +53,9 @@ public class RMMetaDataGet extends DeclarativeWebScript
|
||||
/** NodeRef pattern */
|
||||
private static final Pattern nodeRefPattern = Pattern.compile(".+://.+/.+");
|
||||
|
||||
/** QName pattern */
|
||||
private static final Pattern qnamePattern = Pattern.compile(".+:[^=,]+");
|
||||
|
||||
/** Records management service */
|
||||
private RecordsManagementService rmService;
|
||||
|
||||
@@ -103,14 +106,18 @@ public class RMMetaDataGet extends DeclarativeWebScript
|
||||
if (nodeRef == null || nodeRef.length() == 0)
|
||||
{
|
||||
String type = req.getParameter(PARAM_TYPE);
|
||||
if (type != null && type.length() != 0)
|
||||
if (type != null && type.length() != 0 && type.indexOf(':') != -1)
|
||||
{
|
||||
QName qname = QName.createQName(type, namespaceService);
|
||||
FilePlanComponentKind kind = rmService.getFilePlanComponentKindFromType(qname);
|
||||
if (kind != null)
|
||||
{
|
||||
result = kind.toString();
|
||||
}
|
||||
Matcher m = qnamePattern.matcher(type);
|
||||
if (m.matches() == true)
|
||||
{
|
||||
QName qname = QName.createQName(type, namespaceService);
|
||||
FilePlanComponentKind kind = rmService.getFilePlanComponentKindFromType(qname);
|
||||
if (kind != null)
|
||||
{
|
||||
result = kind.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user