Topic
  • 2 replies
  • Latest Post - ‏2012-09-04T21:32:30Z by Dave Sanders
Pratz25
Pratz25
8 Posts

Pinned topic Adding typeDefination property while uploading file in CM

‏2012-08-31T17:49:11Z |
I am developing CMIS with GWT, filenet CM

I have to add a Document and its typeDefination property.

Example cmis:name = xyz.txt
cmis:objectTypeId = Email

and the other TypeDefination property are

1.From : dataType : String , Cardinality : SINGLE ChoiceList : "absent" value = String

2.To: dataType : String , Cardinality : Multi ChoiceList : "absent" value = List<String>
3.Cc: dataType : String , Cardinality : Multi ChoiceList : "present" value = List<String>
4.Subject: dataType : String , Cardinality : SINGLE ChoiceList : "present" value = String
5.SentOn: dataType : Date, Cardinality : SINGLE ChoiceList: "absent" value = Date
PropertyTable is

Map<String, Object> newDocumentProperties = new HashMap<String, Object>();

newDocumentProperties.put(cmis:objectTypeId,"Email");
newDocumentProperties.put(cmis:name,"azerty");
newDocumentProperties.put( To ,aaaa, zzzzz);
newDocumentProperties.put(From,"qwerty");

for Above properties the document is added

but when i add the below given peoperties i receive an error

newDocumentProperties.put(Cc,User);
newDocumentProperties.put(Subject,"document");
newDocumentProperties.put(Sent On ,Thu Aug 16 00:00:00 UTC 2012);

Property 'Received On' , CC and Subject is not valid for this type!

this is only problem when the cardinality is Multi or datatype is DateTime

So what are the other things to be considered to add these custom properties

Plz help

Thanks and Regards
Updated on 2012-09-04T21:32:30Z at 2012-09-04T21:32:30Z by Dave Sanders
  • Dave Sanders
    Dave Sanders
    19 Posts

    Re: Adding typeDefination property while uploading file in CM

    ‏2012-09-04T21:30:17Z  
    [2] has examples of setting DateTime and multi-valued properties. [1] has GregorianCalendar examples. The attached Groovy script creates a document with a DateTime property.

    [1] http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html
    [2] http://chemistry.apache.org/java/examples/example-create-update.html > Updating properties
  • Dave Sanders
    Dave Sanders
    19 Posts

    Re: Adding typeDefination property while uploading file in CM

    ‏2012-09-04T21:32:30Z  
    [2] has examples of setting DateTime and multi-valued properties. [1] has GregorianCalendar examples. The attached Groovy script creates a document with a DateTime property.

    [1] http://docs.oracle.com/javase/7/docs/api/java/util/GregorianCalendar.html
    [2] http://chemistry.apache.org/java/examples/example-create-update.html > Updating properties
    Here's the attached Groovy script that I forgot to attach to my previous response.