Search in sources :

Example 1 with PropertyDefinitionWrapper

use of org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper in project alfresco-repository by Alfresco.

the class CMISConnector method getNodeProperties.

public Properties getNodeProperties(CMISNodeInfo info, String filter) {
    PropertiesImpl result = new PropertiesImpl();
    Set<String> filterSet = splitFilter(filter);
    for (PropertyDefinitionWrapper propDef : info.getType().getProperties()) {
        if (!propDef.getPropertyId().equals(PropertyIds.OBJECT_ID)) {
            // don't filter the object id
            if ((filterSet != null) && (!filterSet.contains(propDef.getPropertyDefinition().getQueryName()))) {
                // skip properties that are not in the filter
                continue;
            }
        }
        Serializable value = propDef.getPropertyAccessor().getValue(info);
        result.addProperty(getProperty(propDef.getPropertyDefinition().getPropertyType(), propDef, value));
    }
    addAspectProperties(info, filter, result);
    return result;
}
Also used : Serializable(java.io.Serializable) PropertyDefinitionWrapper(org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper) PropertiesImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.PropertiesImpl) PropertyString(org.apache.chemistry.opencmis.commons.data.PropertyString)

Example 2 with PropertyDefinitionWrapper

use of org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper in project alfresco-repository by Alfresco.

the class CMISConnector method setAspectProperties.

private void setAspectProperties(NodeRef nodeRef, boolean isNameChanging, CmisExtensionElement aspectExtension) {
    if (aspectExtension.getChildren() == null) {
        return;
    }
    List<String> aspectsToAdd = new ArrayList<String>();
    List<String> aspectsToRemove = new ArrayList<String>();
    Map<QName, List<Serializable>> aspectProperties = new HashMap<QName, List<Serializable>>();
    for (CmisExtensionElement extension : aspectExtension.getChildren()) {
        if (!ALFRESCO_EXTENSION_NAMESPACE.equals(extension.getNamespace())) {
            continue;
        }
        if (ASPECTS_TO_ADD.equals(extension.getName()) && (extension.getValue() != null)) {
            aspectsToAdd.add(extension.getValue());
        } else if (ASPECTS_TO_REMOVE.equals(extension.getName()) && (extension.getValue() != null)) {
            aspectsToRemove.add(extension.getValue());
        } else if (PROPERTIES.equals(extension.getName()) && (extension.getChildren() != null)) {
            for (CmisExtensionElement property : extension.getChildren()) {
                if (!property.getName().startsWith("property")) {
                    continue;
                }
                String propertyId = (property.getAttributes() == null ? null : property.getAttributes().get("propertyDefinitionId"));
                if ((propertyId == null) || (property.getChildren() == null)) {
                    continue;
                }
                PropertyType propertyType = PropertyType.STRING;
                DatatypeFactory df = null;
                if (property.getName().equals("propertyBoolean")) {
                    propertyType = PropertyType.BOOLEAN;
                } else if (property.getName().equals("propertyInteger")) {
                    propertyType = PropertyType.INTEGER;
                } else if (property.getName().equals("propertyDateTime")) {
                    propertyType = PropertyType.DATETIME;
                    try {
                        df = DatatypeFactory.newInstance();
                    } catch (DatatypeConfigurationException e) {
                        throw new CmisRuntimeException("Aspect conversation exception: " + e.getMessage(), e);
                    }
                } else if (property.getName().equals("propertyDecimal")) {
                    propertyType = PropertyType.DECIMAL;
                }
                ArrayList<Serializable> values = new ArrayList<Serializable>();
                if (property.getChildren() != null) {
                    // {
                    for (CmisExtensionElement valueElement : property.getChildren()) {
                        if ("value".equals(valueElement.getName())) {
                            switch(propertyType) {
                                case BOOLEAN:
                                    try {
                                        values.add(Boolean.parseBoolean(valueElement.getValue()));
                                    } catch (Exception e) {
                                        throw new CmisInvalidArgumentException("Invalid property aspect value: " + propertyId, e);
                                    }
                                    break;
                                case DATETIME:
                                    try {
                                        values.add(df.newXMLGregorianCalendar(valueElement.getValue()).toGregorianCalendar());
                                    } catch (Exception e) {
                                        throw new CmisInvalidArgumentException("Invalid property aspect value: " + propertyId, e);
                                    }
                                    break;
                                case INTEGER:
                                    BigInteger value = null;
                                    try {
                                        value = new BigInteger(valueElement.getValue());
                                    } catch (Exception e) {
                                        throw new CmisInvalidArgumentException("Invalid property aspect value: " + propertyId, e);
                                    }
                                    // overflow check
                                    PropertyDefinitionWrapper propDef = getOpenCMISDictionaryService().findProperty(propertyId);
                                    if (propDef == null) {
                                        throw new CmisInvalidArgumentException("Property " + propertyId + " is unknown!");
                                    }
                                    QName propertyQName = propDef.getPropertyAccessor().getMappedProperty();
                                    if (propertyQName == null) {
                                        throw new CmisConstraintException("Unable to set property " + propertyId + "!");
                                    }
                                    org.alfresco.service.cmr.dictionary.PropertyDefinition def = dictionaryService.getProperty(propertyQName);
                                    QName dataDef = def.getDataType().getName();
                                    if (dataDef.equals(DataTypeDefinition.INT) && (value.compareTo(maxInt) > 0 || value.compareTo(minInt) < 0)) {
                                        throw new CmisConstraintException("Value is out of range for property " + propertyId);
                                    }
                                    if (dataDef.equals(DataTypeDefinition.LONG) && (value.compareTo(maxLong) > 0 || value.compareTo(minLong) < 0)) {
                                        throw new CmisConstraintException("Value is out of range for property " + propertyId);
                                    }
                                    values.add(value);
                                    break;
                                case DECIMAL:
                                    try {
                                        values.add(new BigDecimal(valueElement.getValue()));
                                    } catch (Exception e) {
                                        throw new CmisInvalidArgumentException("Invalid property aspect value: " + propertyId, e);
                                    }
                                    break;
                                default:
                                    values.add(valueElement.getValue());
                            }
                        }
                    }
                }
                aspectProperties.put(QName.createQName(propertyId, namespaceService), values);
            }
        }
    }
    // remove and add aspects
    String aspectType = null;
    try {
        for (String aspect : aspectsToRemove) {
            aspectType = aspect;
            TypeDefinitionWrapper type = getType(aspect);
            if (type == null) {
                throw new CmisInvalidArgumentException("Invalid aspect: " + aspectType);
            }
            QName typeName = type.getAlfrescoName();
            // if aspect is hidden aspect, remove only if hidden node is not client controlled
            if (typeName.equals(ContentModel.ASPECT_HIDDEN)) {
                if (hiddenAspect.isClientControlled(nodeRef) || aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED)) {
                    // manipulate hidden aspect only if client controlled
                    nodeService.removeAspect(nodeRef, typeName);
                }
            // if(!isNameChanging && !hiddenAspect.isClientControlled(nodeRef) && !aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED))
            // {
            // nodeService.removeAspect(nodeRef, typeName);
            // }
            } else {
                nodeService.removeAspect(nodeRef, typeName);
            }
        }
        for (String aspect : aspectsToAdd) {
            aspectType = aspect;
            TypeDefinitionWrapper type = getType(aspect);
            if (type == null) {
                throw new CmisInvalidArgumentException("Invalid aspect: " + aspectType);
            }
            QName typeName = type.getAlfrescoName();
            // if aspect is hidden aspect, remove only if hidden node is not client controlled
            if (typeName.equals(ContentModel.ASPECT_HIDDEN)) {
                if (hiddenAspect.isClientControlled(nodeRef) || aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED)) {
                    // manipulate hidden aspect only if client controlled
                    nodeService.addAspect(nodeRef, type.getAlfrescoName(), Collections.<QName, Serializable>emptyMap());
                }
            // if(!isNameChanging && !hiddenAspect.isClientControlled(nodeRef) && !aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED))
            // {
            // nodeService.addAspect(nodeRef, type.getAlfrescoName(),
            // Collections.<QName, Serializable> emptyMap());
            // }
            } else {
                nodeService.addAspect(nodeRef, type.getAlfrescoName(), Collections.<QName, Serializable>emptyMap());
            }
        }
    } catch (InvalidAspectException e) {
        throw new CmisInvalidArgumentException("Invalid aspect: " + aspectType);
    } catch (InvalidNodeRefException e) {
        throw new CmisInvalidArgumentException("Invalid node: " + nodeRef);
    }
    // set property
    for (Map.Entry<QName, List<Serializable>> property : aspectProperties.entrySet()) {
        QName propertyQName = property.getKey();
        if (property.getValue().isEmpty()) {
            if (HiddenAspect.HIDDEN_PROPERTIES.contains(property.getKey())) {
                if (hiddenAspect.isClientControlled(nodeRef) || aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED)) {
                    // manipulate hidden aspect property only if client controlled
                    nodeService.removeProperty(nodeRef, propertyQName);
                }
            } else {
                nodeService.removeProperty(nodeRef, property.getKey());
            }
        } else {
            if (HiddenAspect.HIDDEN_PROPERTIES.contains(property.getKey())) {
                if (hiddenAspect.isClientControlled(nodeRef) || aspectProperties.containsKey(ContentModel.PROP_CLIENT_CONTROLLED)) {
                    // manipulate hidden aspect property only if client controlled
                    nodeService.setProperty(nodeRef, property.getKey(), property.getValue().size() == 1 ? property.getValue().get(0) : (Serializable) property.getValue());
                }
            } else {
                Serializable value = (Serializable) property.getValue();
                nodeService.setProperty(nodeRef, property.getKey(), property.getValue().size() == 1 ? property.getValue().get(0) : value);
            }
        }
    }
}
Also used : Serializable(java.io.Serializable) CmisRuntimeException(org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException) HashMap(java.util.HashMap) ItemTypeDefinitionWrapper(org.alfresco.opencmis.dictionary.ItemTypeDefinitionWrapper) TypeDefinitionWrapper(org.alfresco.opencmis.dictionary.TypeDefinitionWrapper) DocumentTypeDefinitionWrapper(org.alfresco.opencmis.dictionary.DocumentTypeDefinitionWrapper) ArrayList(java.util.ArrayList) PropertyString(org.apache.chemistry.opencmis.commons.data.PropertyString) PropertyType(org.apache.chemistry.opencmis.commons.enums.PropertyType) PropertyDefinitionWrapper(org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) Collections.singletonList(java.util.Collections.singletonList) ObjectList(org.apache.chemistry.opencmis.commons.data.ObjectList) ArrayList(java.util.ArrayList) List(java.util.List) InvalidNodeRefException(org.alfresco.service.cmr.repository.InvalidNodeRefException) DatatypeFactory(javax.xml.datatype.DatatypeFactory) QName(org.alfresco.service.namespace.QName) CmisConstraintException(org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException) CmisContentAlreadyExistsException(org.apache.chemistry.opencmis.commons.exceptions.CmisContentAlreadyExistsException) FileExistsException(org.alfresco.service.cmr.model.FileExistsException) InvalidAspectException(org.alfresco.service.cmr.dictionary.InvalidAspectException) AccessDeniedException(org.alfresco.repo.security.permissions.AccessDeniedException) CmisConstraintException(org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException) CmisBaseException(org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException) IOException(java.io.IOException) BeansException(org.springframework.beans.BeansException) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) CmisStreamNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisStreamNotSupportedException) AlfrescoRuntimeException(org.alfresco.error.AlfrescoRuntimeException) DatatypeConfigurationException(javax.xml.datatype.DatatypeConfigurationException) CmisRuntimeException(org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException) FileNotFoundException(org.alfresco.service.cmr.model.FileNotFoundException) InvalidNodeRefException(org.alfresco.service.cmr.repository.InvalidNodeRefException) BigDecimal(java.math.BigDecimal) InvalidAspectException(org.alfresco.service.cmr.dictionary.InvalidAspectException) CmisExtensionElement(org.apache.chemistry.opencmis.commons.data.CmisExtensionElement) DatatypeConfigurationException(javax.xml.datatype.DatatypeConfigurationException) BigInteger(java.math.BigInteger) Map(java.util.Map) HashMap(java.util.HashMap)

Example 3 with PropertyDefinitionWrapper

use of org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper in project alfresco-repository by Alfresco.

the class CMISConnector method addAspectProperties.

private void addAspectProperties(CMISNodeInfo info, String filter, PropertiesImpl result) {
    if (getRequestCmisVersion().equals(CmisVersion.CMIS_1_1)) {
        Set<String> propertyIds = new HashSet<>();
        Set<String> filterSet = splitFilter(filter);
        Set<QName> aspects = info.getNodeAspects();
        for (QName aspect : aspects) {
            TypeDefinitionWrapper aspectType = getOpenCMISDictionaryService().findNodeType(aspect);
            if (aspectType == null) {
                continue;
            }
            for (PropertyDefinitionWrapper propDef : aspectType.getProperties()) {
                if (propertyIds.contains(propDef.getPropertyId())) {
                    // skip properties that have already been added
                    continue;
                }
                if ((filterSet != null) && (!filterSet.contains(propDef.getPropertyDefinition().getQueryName()))) {
                    // skip properties that are not in the filter
                    continue;
                }
                Serializable value = propDef.getPropertyAccessor().getValue(info);
                result.addProperty(getProperty(propDef.getPropertyDefinition().getPropertyType(), propDef, value));
                // mark property as 'added'
                propertyIds.add(propDef.getPropertyId());
            }
        }
    }
}
Also used : Serializable(java.io.Serializable) PropertyDefinitionWrapper(org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper) QName(org.alfresco.service.namespace.QName) ItemTypeDefinitionWrapper(org.alfresco.opencmis.dictionary.ItemTypeDefinitionWrapper) TypeDefinitionWrapper(org.alfresco.opencmis.dictionary.TypeDefinitionWrapper) DocumentTypeDefinitionWrapper(org.alfresco.opencmis.dictionary.DocumentTypeDefinitionWrapper) PropertyString(org.apache.chemistry.opencmis.commons.data.PropertyString) HashSet(java.util.HashSet)

Example 4 with PropertyDefinitionWrapper

use of org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper in project alfresco-repository by Alfresco.

the class AlfrescoCmisServiceImpl method getCheckedOutDocs.

@Override
public ObjectList getCheckedOutDocs(String repositoryId, String folderId, String filter, String orderBy, Boolean includeAllowableActions, IncludeRelationships includeRelationships, String renditionFilter, BigInteger maxItems, BigInteger skipCount, ExtensionsData extension) {
    long start = System.currentTimeMillis();
    checkRepositoryId(repositoryId);
    // convert BigIntegers to int
    int max = (maxItems == null ? Integer.MAX_VALUE : maxItems.intValue());
    int skip = (skipCount == null || skipCount.intValue() < 0 ? 0 : skipCount.intValue());
    // prepare query
    SearchParameters params = new SearchParameters();
    params.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
    if (folderId == null) {
        params.setQuery("+=cm:workingCopyOwner:\"" + AuthenticationUtil.getFullyAuthenticatedUser() + "\"");
        params.addStore(connector.getRootStoreRef());
    } else {
        CMISNodeInfo folderInfo = getOrCreateFolderInfo(folderId, "Folder");
        params.setQuery("+=cm:workingCopyOwner:\"" + AuthenticationUtil.getFullyAuthenticatedUser() + "\" AND +=PARENT:\"" + folderInfo.getNodeRef().toString() + "\"");
        params.addStore(folderInfo.getNodeRef().getStoreRef());
    }
    // set up order
    if (orderBy != null) {
        String[] parts = orderBy.split(",");
        for (int i = 0; i < parts.length; i++) {
            String[] sort = parts[i].split(" +");
            if (sort.length < 1) {
                continue;
            }
            PropertyDefinitionWrapper propDef = connector.getOpenCMISDictionaryService().findPropertyByQueryName(sort[0]);
            if (propDef != null) {
                if (propDef.getPropertyDefinition().isOrderable()) {
                    QName sortProp = propDef.getPropertyAccessor().getMappedProperty();
                    if (sortProp != null) {
                        boolean sortAsc = (sort.length == 1) || sort[1].equalsIgnoreCase("asc");
                        params.addSort(propDef.getPropertyLuceneBuilder().getLuceneFieldName(), sortAsc);
                    } else {
                        if (logger.isDebugEnabled()) {
                            logger.debug("Ignore sort property '" + sort[0] + " - mapping not found");
                        }
                    }
                } else {
                    if (logger.isDebugEnabled()) {
                        logger.debug("Ignore sort property '" + sort[0] + " - not orderable");
                    }
                }
            } else {
                if (logger.isDebugEnabled()) {
                    logger.debug("Ignore sort property '" + sort[0] + " - query name not found");
                }
            }
        }
    }
    // execute query
    ResultSet resultSet = null;
    List<NodeRef> nodeRefs;
    try {
        resultSet = connector.getSearchService().query(params);
        nodeRefs = resultSet.getNodeRefs();
    } finally {
        if (resultSet != null) {
            resultSet.close();
        }
    }
    // collect results
    ObjectListImpl result = new ObjectListImpl();
    List<ObjectData> list = new ArrayList<ObjectData>();
    result.setObjects(list);
    int skipCounter = skip;
    if (max > 0) {
        for (NodeRef nodeRef : nodeRefs) {
            // TODO - perhaps filter by path in the query instead?
            if (connector.filter(nodeRef)) {
                continue;
            }
            if (skipCounter > 0) {
                skipCounter--;
                continue;
            }
            if (list.size() == max) {
                break;
            }
            try {
                // create a CMIS object
                CMISNodeInfo ni = createNodeInfo(nodeRef);
                ObjectData object = connector.createCMISObject(ni, filter, includeAllowableActions, includeRelationships, renditionFilter, false, false);
                boolean isObjectInfoRequired = getContext().isObjectInfoRequired();
                if (isObjectInfoRequired) {
                    getObjectInfo(repositoryId, ni.getObjectId(), includeRelationships);
                }
                // add it
                list.add(object);
            } catch (InvalidNodeRefException e) {
            // ignore invalid objects
            } catch (CmisObjectNotFoundException e) {
            // ignore objects that have not been found (perhaps because their type is unknown to CMIS)
            }
        }
    }
    // has more ?
    result.setHasMoreItems(nodeRefs.size() - skip > list.size());
    logGetObjectsCall("getCheckedOutDocs", start, folderId, list.size(), filter, includeAllowableActions, includeRelationships, renditionFilter, null, extension, skipCount, maxItems, orderBy, null);
    return result;
}
Also used : QName(org.alfresco.service.namespace.QName) ObjectData(org.apache.chemistry.opencmis.commons.data.ObjectData) ArrayList(java.util.ArrayList) CMISNodeInfo(org.alfresco.opencmis.dictionary.CMISNodeInfo) ObjectListImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ObjectListImpl) SearchParameters(org.alfresco.service.cmr.search.SearchParameters) NodeRef(org.alfresco.service.cmr.repository.NodeRef) PropertyDefinitionWrapper(org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) ResultSet(org.alfresco.service.cmr.search.ResultSet) InvalidNodeRefException(org.alfresco.service.cmr.repository.InvalidNodeRefException)

Example 5 with PropertyDefinitionWrapper

use of org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper in project alfresco-repository by Alfresco.

the class CMISTest method testACE3322.

/**
 * ACE-3322
 */
@Test
public void testACE3322() {
    final String[] types = { "cmis:document", "cmis:relationship", "cmis:folder", "cmis:item" };
    CmisServiceCallback<String> callback = new CmisServiceCallback<String>() {

        @Override
        public String execute(CmisService cmisService) {
            for (int i = 0; i < types.length; i++) {
                List<TypeDefinitionWrapper> baseTypes = cmisDictionaryService.getBaseTypes();
                assertNotNull(baseTypes);
                checkDefs(baseTypes);
                List<TypeDefinitionWrapper> children = cmisDictionaryService.getChildren(types[i]);
                assertNotNull(children);
                // Check that children were updated
                checkDefs(children);
            }
            return "";
        }

        private void checkDefs(List<TypeDefinitionWrapper> defs) {
            for (TypeDefinitionWrapper def : defs) {
                assertNotNull("Type definition was not updated. Please refer to ACE-3322", def.getTypeDefinition(false).getDisplayName());
                assertNotNull("Type definition was not updated. Please refer to ACE-3322", def.getTypeDefinition(false).getDescription());
                // Check that property's display name and description were updated
                for (PropertyDefinitionWrapper property : def.getProperties()) {
                    assertNotNull("Display name is null", property.getPropertyDefinition().getDisplayName());
                    assertNotNull("Description is null", property.getPropertyDefinition().getDescription());
                }
            }
        }
    };
    withCmisService(callback, CmisVersion.CMIS_1_1);
}
Also used : PropertyDefinitionWrapper(org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper) CmisService(org.apache.chemistry.opencmis.commons.server.CmisService) TypeDefinitionWrapper(org.alfresco.opencmis.dictionary.TypeDefinitionWrapper) ObjectInFolderList(org.apache.chemistry.opencmis.commons.data.ObjectInFolderList) ArrayList(java.util.ArrayList) ObjectList(org.apache.chemistry.opencmis.commons.data.ObjectList) List(java.util.List) VersionableAspectTest(org.alfresco.repo.version.VersionableAspectTest) Test(org.junit.Test)

Aggregations

PropertyDefinitionWrapper (org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper)12 PropertyString (org.apache.chemistry.opencmis.commons.data.PropertyString)8 TypeDefinitionWrapper (org.alfresco.opencmis.dictionary.TypeDefinitionWrapper)7 Serializable (java.io.Serializable)6 ArrayList (java.util.ArrayList)6 QName (org.alfresco.service.namespace.QName)6 DocumentTypeDefinitionWrapper (org.alfresco.opencmis.dictionary.DocumentTypeDefinitionWrapper)5 ItemTypeDefinitionWrapper (org.alfresco.opencmis.dictionary.ItemTypeDefinitionWrapper)5 List (java.util.List)4 ObjectList (org.apache.chemistry.opencmis.commons.data.ObjectList)4 Collections.singletonList (java.util.Collections.singletonList)3 CmisExtensionElement (org.apache.chemistry.opencmis.commons.data.CmisExtensionElement)3 CmisConstraintException (org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException)3 CmisInvalidArgumentException (org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException)3 BigInteger (java.math.BigInteger)2 HashMap (java.util.HashMap)2 HashSet (java.util.HashSet)2 FileExistsException (org.alfresco.service.cmr.model.FileExistsException)2 FileNotFoundException (org.alfresco.service.cmr.model.FileNotFoundException)2 InvalidNodeRefException (org.alfresco.service.cmr.repository.InvalidNodeRefException)2