AnsweredAssumed Answered

Using jcrModel.xml

Question asked by dnatarajan on Nov 22, 2010
Hi -

How do I use the types defined in jcrModel.xml. I am particularly interested in

    <type name="nt:resource">
            <property name="jcr:encoding">
            <property name="jcr:mimeType">

I understand from a previous post that the optional nt: types would not be picked up by Alfresco Web Client. Is there a roadmap for this implementation?

Also, in one of the examples, a comment mentions that it is not possible to use JCR to set mime-type for content nodes. Is this true? How can a JCR/RMI application then use the Foundation API to do this??

Would code as shown below work against Alfresco Enterprise 3.3 (JCR/RMI) work with little/no changes?

Node fileNode = node1.addNode(file.getName(), "nt:file");
Node resNode = fileNode.addNode("jcr:content", "nt:resource");
resNode.setProperty("jcr:mimeType", mimeType);
resNode.setProperty("jcr:encoding", "");
resNode.setProperty("jcr:data", new FileInputStream(file));
Calendar lastModified = Calendar.getInstance();
resNode.setProperty("jcr:lastModified", lastModified);

We are trying to figure a lot out and are currently stuck in our evaluation of Alfreso Enterprise. Any help would be greatly appreciated.