You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Venkat Medisetty <ve...@telegraph.co.uk> on 2012/10/12 17:35:35 UTC
Not able to create a cmis user through code
Hi,
I am working on a project where we uses DotCMIS. The requirement we have is
to create a new user using CMIS programatically.
The blow method in DOTCmis throwing an error.
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(PropertyIds.OBJECT_TYPE_ID, "User");
properties.put("cmis:name", “auser”);
properties.put("ot__NAME", “Arnold Userington”);
properties.put("ot__PASSWORD", “1234SRTS=”);
properties.put("ot__STATUS", “ACTIVE”);
properties.put("ot__SECURITY_PROFILE", “Contributor”);
properties.put("ot__CONTRIBUTOR", “TELEMMGLSPLR000000000012”);
ObjectId newID = details.getSession().createDocument(properties,
null, null, VersioningState.NONE);
Regards,
Venkat
Re: Not able to create a cmis user through code
Posted by Florian Müller <fm...@apache.org>.
Hi Venkat,
Got it. This has been fixed in OpenCMIS a while ago but apparently not
in DotCMIS.
Please open an bug report [1].
Thanks,
Florian
[1] https://issues.apache.org/jira/browse/CMIS
> Hi Florian,
>
> The code I have sent you is from openCmis. The same we have converted into C# code. The exception is Objectid must be set. If I pass the Objectid as root then it gives another exception object of Type user cannot be fileable.
>
> Regards
> Venkat
>
> On 12 Oct 2012, at 17:48, Florian Müller<fm...@apache.org> wrote:
>
>> Hi Venkat,
>>
>> That's not DotCMIS. That's OpenCMIS.
>> What is the exception?
>>
>>
>> Florian
>>
>>
>>> Hi,
>>>
>>> I am working on a project where we uses DotCMIS. The requirement we have is
>>> to create a new user using CMIS programatically.
>>>
>>> The blow method in DOTCmis throwing an error.
>>>
>>> Map<String, Object> properties = new HashMap<String, Object>();
>>> properties.put(PropertyIds.OBJECT_TYPE_ID, "User");
>>> properties.put("cmis:name", “auser”);
>>> properties.put("ot__NAME", “Arnold Userington”);
>>> properties.put("ot__PASSWORD", “1234SRTS=”);
>>> properties.put("ot__STATUS", “ACTIVE”);
>>> properties.put("ot__SECURITY_PROFILE", “Contributor”);
>>> properties.put("ot__CONTRIBUTOR", “TELEMMGLSPLR000000000012”);
>>> ObjectId newID = details.getSession().createDocument(properties,
>>> null, null, VersioningState.NONE);
>>>
>>> Regards,
>>> Venkat
>
Re: Not able to create a cmis user through code
Posted by Venkat <ve...@telegraph.co.uk>.
Hi Florian,
The code I have sent you is from openCmis. The same we have converted into C# code. The exception is Objectid must be set. If I pass the Objectid as root then it gives another exception object of Type user cannot be fileable.
Regards
Venkat
On 12 Oct 2012, at 17:48, Florian Müller <fm...@apache.org> wrote:
> Hi Venkat,
>
> That's not DotCMIS. That's OpenCMIS.
> What is the exception?
>
>
> Florian
>
>
>> Hi,
>>
>> I am working on a project where we uses DotCMIS. The requirement we have is
>> to create a new user using CMIS programatically.
>>
>> The blow method in DOTCmis throwing an error.
>>
>> Map<String, Object> properties = new HashMap<String, Object>();
>> properties.put(PropertyIds.OBJECT_TYPE_ID, "User");
>> properties.put("cmis:name", “auser”);
>> properties.put("ot__NAME", “Arnold Userington”);
>> properties.put("ot__PASSWORD", “1234SRTS=”);
>> properties.put("ot__STATUS", “ACTIVE”);
>> properties.put("ot__SECURITY_PROFILE", “Contributor”);
>> properties.put("ot__CONTRIBUTOR", “TELEMMGLSPLR000000000012”);
>> ObjectId newID = details.getSession().createDocument(properties,
>> null, null, VersioningState.NONE);
>>
>> Regards,
>> Venkat
>
Re: Not able to create a cmis user through code
Posted by Florian Müller <fm...@apache.org>.
Hi Venkat,
That's not DotCMIS. That's OpenCMIS.
What is the exception?
Florian
> Hi,
>
> I am working on a project where we uses DotCMIS. The requirement we
> have is
> to create a new user using CMIS programatically.
>
> The blow method in DOTCmis throwing an error.
>
> Map<String, Object> properties = new HashMap<String, Object>();
> properties.put(PropertyIds.OBJECT_TYPE_ID, "User");
> properties.put("cmis:name", “auser”);
> properties.put("ot__NAME", “Arnold Userington”);
> properties.put("ot__PASSWORD", “1234SRTS=”);
> properties.put("ot__STATUS", “ACTIVE”);
> properties.put("ot__SECURITY_PROFILE", “Contributor”);
> properties.put("ot__CONTRIBUTOR", “TELEMMGLSPLR000000000012”);
> ObjectId newID = details.getSession().createDocument(properties,
> null, null, VersioningState.NONE);
>
> Regards,
> Venkat