eXo JCR :: Component :: Webdav Service 1.15.10-GA

org.exoplatform.services.jcr.webdav.util
Class NodeTypeUtil

java.lang.Object
  extended by org.exoplatform.services.jcr.webdav.util.NodeTypeUtil

public class NodeTypeUtil
extends Object

Created by The eXo Platform SARL Author : Vitaly Guly.

Version:
$Id: $

Constructor Summary
NodeTypeUtil()
           
 
Method Summary
static void checkContentResourceType(javax.jcr.nodetype.NodeType contentNodeType)
          Cheks if the NodeType of content node extends nt:resource.
static String getContentNodeType(String contentNodeTypeHeader)
          Returns the NodeType of content node according to the Content-NodeType header.
static ArrayList<String> getMixinTypes(String mixinTypes)
          Returns the list of node mixins.
static String getNodeType(String nodeTypeHeader, String defaultNodeType, Set<String> allowedNodeTypes)
          Returns parsed nodeType obtained from node-type header.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NodeTypeUtil

public NodeTypeUtil()
Method Detail

getNodeType

public static String getNodeType(String nodeTypeHeader,
                                 String defaultNodeType,
                                 Set<String> allowedNodeTypes)
                          throws javax.jcr.nodetype.NoSuchNodeTypeException
Returns parsed nodeType obtained from node-type header. This method is unified for files and folders.

Parameters:
nodeTypeHeader -
defaultNodeType -
allowedNodeTypes -
Returns:
Throws:
javax.jcr.nodetype.NoSuchNodeTypeException - is thrown if node-type header contains not allowed node type

getContentNodeType

public static String getContentNodeType(String contentNodeTypeHeader)
Returns the NodeType of content node according to the Content-NodeType header.

Parameters:
contentNodeTypeHeader - Content-NodeType header
Returns:
Nodetype

checkContentResourceType

public static void checkContentResourceType(javax.jcr.nodetype.NodeType contentNodeType)
                                     throws javax.jcr.nodetype.NoSuchNodeTypeException
Cheks if the NodeType of content node extends nt:resource.

Parameters:
contentNodeType - Content-NodeType header
Throws:
javax.jcr.nodetype.NoSuchNodeTypeException - NoSuchNodeTypeException

getMixinTypes

public static ArrayList<String> getMixinTypes(String mixinTypes)
Returns the list of node mixins.

Parameters:
mixinTypes - list of mixins or null
Returns:
list of mixins

eXo JCR :: Component :: Webdav Service 1.15.10-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.