You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Álvaro de los Reyes (JIRA)" <ji...@apache.org> on 2017/03/06 11:50:32 UTC

[jira] [Updated] (CMIS-1015) GetTypeDescendants is not working - typeLinkCache problem

     [ https://issues.apache.org/jira/browse/CMIS-1015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Álvaro de los Reyes updated CMIS-1015:
--------------------------------------
    Description: 
I've made the call "session.GetTypeDescendants("cmis:document", -1, true)".

It doesn't work, returns CmisObjectNotFoundException.

The problem is in cache called "typeLinkCache".
In AtomPubUtils class, the function "GetTypeLink" searches the link by the following parameters: repositoryId, id, rel, type.
However, in the method "AddTypeLink" add the link to typeLinkCache by the following keys: link, repositoryId, id, rel.

I change the implementation of the method "AddTypeLink" and it work properly:

public void AddTypeLink(string repositoryId, string id, string rel, string type, string link)
        {
            if (KnownLinks.Contains(rel))
            {
                //typeLinkCache.Put(new string[] { link, repositoryId, id, rel }, type);
                typeLinkCache.Put(new string[] { repositoryId, id, rel, type }, link);
            }
        }

  was:
I've made the call "session.GetTypeDescendants("cmis:document", -1, true)".

It doesn't work, returns CmisObjectNotFoundException.

The problem is in cache, typeLinkCache.
In AtomPubUtils class, the function "GetTypeLink" searches the link by the following parameters: repositoryId, id, rel, type.
However, in the method "AddTypeLink" add the link to typeLinkCache by the following keys: link, repositoryId, id, rel.

I change the implementation of the method "AddTypeLink" and it work properly:

public void AddTypeLink(string repositoryId, string id, string rel, string type, string link)
        {
            if (KnownLinks.Contains(rel))
            {
                //typeLinkCache.Put(new string[] { link, repositoryId, id, rel }, type);
                typeLinkCache.Put(new string[] { repositoryId, id, rel, type }, link);
            }
        }


> GetTypeDescendants is not working - typeLinkCache problem
> ---------------------------------------------------------
>
>                 Key: CMIS-1015
>                 URL: https://issues.apache.org/jira/browse/CMIS-1015
>             Project: Chemistry
>          Issue Type: Bug
>          Components: portcmis
>    Affects Versions: PortCMIS 0.1.0
>         Environment: Sharepoint 2013
>            Reporter: Álvaro de los Reyes
>
> I've made the call "session.GetTypeDescendants("cmis:document", -1, true)".
> It doesn't work, returns CmisObjectNotFoundException.
> The problem is in cache called "typeLinkCache".
> In AtomPubUtils class, the function "GetTypeLink" searches the link by the following parameters: repositoryId, id, rel, type.
> However, in the method "AddTypeLink" add the link to typeLinkCache by the following keys: link, repositoryId, id, rel.
> I change the implementation of the method "AddTypeLink" and it work properly:
> public void AddTypeLink(string repositoryId, string id, string rel, string type, string link)
>         {
>             if (KnownLinks.Contains(rel))
>             {
>                 //typeLinkCache.Put(new string[] { link, repositoryId, id, rel }, type);
>                 typeLinkCache.Put(new string[] { repositoryId, id, rel, type }, link);
>             }
>         }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)