org.alfresco.jcr.item
Class ItemResolver

java.lang.Object
  extended by org.alfresco.jcr.item.ItemResolver

public class ItemResolver
extends java.lang.Object

Responsible for finding JCR Items (Nodes, Properties) from Alfresco equivalents


Constructor Summary
ItemResolver()
           
 
Method Summary
static ItemImpl findItem(SessionImpl context, org.alfresco.service.cmr.repository.NodeRef from, java.lang.String path)
          Create an Item from a JCR Path
static NodeImpl findNode(SessionImpl context, org.alfresco.service.cmr.repository.NodeRef from, java.lang.String path)
          Create an Node from a JCR Path
static org.alfresco.service.cmr.repository.NodeRef getNodeRef(SessionImpl context, org.alfresco.service.cmr.repository.NodeRef from, java.lang.String path)
          Gets the Node Reference for the node at the specified path
static boolean itemExists(SessionImpl context, org.alfresco.service.cmr.repository.NodeRef from, java.lang.String path)
          Determine if Item exists
static boolean nodeExists(SessionImpl context, org.alfresco.service.cmr.repository.NodeRef from, java.lang.String path)
          Determine if Node exists
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemResolver

public ItemResolver()
Method Detail

findItem

public static ItemImpl findItem(SessionImpl context,
                                org.alfresco.service.cmr.repository.NodeRef from,
                                java.lang.String path)
                         throws javax.jcr.PathNotFoundException
Create an Item from a JCR Path

Parameters:
context - session context
from - starting node for path
path - the path
Returns:
the Item (Node or Property)
Throws:
javax.jcr.PathNotFoundException

findNode

public static NodeImpl findNode(SessionImpl context,
                                org.alfresco.service.cmr.repository.NodeRef from,
                                java.lang.String path)
                         throws javax.jcr.PathNotFoundException
Create an Node from a JCR Path

Parameters:
context - session context
from - starting node for path
path - the path
Returns:
the Item (Node or Property)
Throws:
javax.jcr.PathNotFoundException

itemExists

public static boolean itemExists(SessionImpl context,
                                 org.alfresco.service.cmr.repository.NodeRef from,
                                 java.lang.String path)
Determine if Item exists

Parameters:
context - session context
from - starting node for path
path - the path
Returns:
true => exists, false => no it doesn't

nodeExists

public static boolean nodeExists(SessionImpl context,
                                 org.alfresco.service.cmr.repository.NodeRef from,
                                 java.lang.String path)
Determine if Node exists

Parameters:
context - session context
from - starting node for path
path - the path
Returns:
true => exists, false => no it doesn't

getNodeRef

public static org.alfresco.service.cmr.repository.NodeRef getNodeRef(SessionImpl context,
                                                                     org.alfresco.service.cmr.repository.NodeRef from,
                                                                     java.lang.String path)
Gets the Node Reference for the node at the specified path

Parameters:
context - session context
from - the starting node for the path
path - the path
Returns:
the node reference (or null if not found)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.