Package org.alfresco.service.cmr.repository

Examples of org.alfresco.service.cmr.repository.ContentData


  public int getSize(CMObject node) {
    if (node.isSubTypeOf(ContentModel.TYPE_FOLDER)) {
      return -1;
    } else {
      ContentData content = (ContentData) serviceRegistry.getNodeService().getProperty(node.getNodeRef(),
          ContentModel.PROP_CONTENT);
      return (int) Math.round((content != null ? content.getSize() : 0L));
    }
  }
View Full Code Here


    public void write(NodeRef nodeRefer, byte[] data) {
        // Getting Mimetype of node       
        QName PROP_QNAME_CONTENT = QName.createQName(
                "http://www.alfresco.org/model/content/1.0", "content");
        ContentData contentData = (ContentData) serviceRegistry.getNodeService()
                .getProperty(nodeRefer, PROP_QNAME_CONTENT);
        String originalMimeType = contentData.getMimetype();

        ContentService contentService = serviceRegistry.getContentService();
        ContentWriter contentWriter = contentService.getWriter(nodeRefer,
                ContentModel.PROP_CONTENT, true);
View Full Code Here

TOP

Related Classes of org.alfresco.service.cmr.repository.ContentData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.