1 17 package org.alfresco.service.cmr.repository; 18 19 import java.io.Serializable ; 20 import java.util.List ; 21 import java.util.Map ; 22 import java.util.Set ; 23 24 import org.alfresco.service.cmr.dictionary.InvalidAspectException; 25 import org.alfresco.service.cmr.dictionary.InvalidTypeException; 26 import org.alfresco.service.namespace.QName; 27 import org.alfresco.service.namespace.QNamePattern; 28 29 34 public interface NodeService 35 { 36 41 public List <StoreRef> getStores(); 42 43 53 public StoreRef createStore(String protocol, String identifier) throws StoreExistsException; 54 55 59 public boolean exists(StoreRef storeRef); 60 61 65 public boolean exists(NodeRef nodeRef); 66 67 75 public NodeRef.Status getNodeStatus(NodeRef nodeRef); 76 77 82 public NodeRef getRootNode(StoreRef storeRef) throws InvalidStoreRefException; 83 84 87 public ChildAssociationRef createNode( 88 NodeRef parentRef, 89 QName assocTypeQName, 90 QName assocQName, 91 QName nodeTypeQName) 92 throws InvalidNodeRefException, InvalidTypeException; 93 94 109 public ChildAssociationRef createNode( 110 NodeRef parentRef, 111 QName assocTypeQName, 112 QName assocQName, 113 QName nodeTypeQName, 114 Map <QName, Serializable > properties) 115 throws InvalidNodeRefException, InvalidTypeException; 116 117 134 public ChildAssociationRef moveNode( 135 NodeRef nodeToMoveRef, 136 NodeRef newParentRef, 137 QName assocTypeQName, 138 QName assocQName) 139 throws InvalidNodeRefException; 140 141 153 public void setChildAssociationIndex( 154 ChildAssociationRef childAssocRef, 155 int index) 156 throws InvalidChildAssociationRefException; 157 158 165 public QName getType(NodeRef nodeRef) throws InvalidNodeRefException; 166 167 179 public void setType(NodeRef nodeRef, QName typeQName) throws InvalidNodeRefException; 180 181 195 public void addAspect( 196 NodeRef nodeRef, 197 QName aspectTypeQName, 198 Map <QName, Serializable > aspectProperties) 199 throws InvalidNodeRefException, InvalidAspectException; 200 201 210 public void removeAspect(NodeRef nodeRef, QName aspectTypeQName) 211 throws InvalidNodeRefException, InvalidAspectException; 212 213 224 public boolean hasAspect(NodeRef nodeRef, QName aspectRef) 225 throws InvalidNodeRefException, InvalidAspectException; 226 227 233 public Set <QName> getAspects(NodeRef nodeRef) throws InvalidNodeRefException; 234 235 245 public void deleteNode(NodeRef nodeRef) throws InvalidNodeRefException; 246 247 260 public ChildAssociationRef addChild( 261 NodeRef parentRef, 262 NodeRef childRef, 263 QName assocTypeQName, 264 QName qname) throws InvalidNodeRefException; 265 266 277 public void removeChild(NodeRef parentRef, NodeRef childRef) throws InvalidNodeRefException; 278 279 284 public Map <QName, Serializable > getProperties(NodeRef nodeRef) throws InvalidNodeRefException; 285 286 292 public Serializable getProperty(NodeRef nodeRef, QName qname) throws InvalidNodeRefException; 293 294 305 public void setProperties(NodeRef nodeRef, Map <QName, Serializable > properties) throws InvalidNodeRefException; 306 307 319 public void setProperty(NodeRef nodeRef, QName qname, Serializable value) throws InvalidNodeRefException; 320 321 329 public List <ChildAssociationRef> getParentAssocs(NodeRef nodeRef) throws InvalidNodeRefException; 330 331 349 public List <ChildAssociationRef> getParentAssocs(NodeRef nodeRef, QNamePattern typeQNamePattern, QNamePattern qnamePattern) 350 throws InvalidNodeRefException; 351 352 366 public List <ChildAssociationRef> getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException; 367 368 382 public List <ChildAssociationRef> getChildAssocs( 383 NodeRef nodeRef, 384 QNamePattern typeQNamePattern, 385 QNamePattern qnamePattern) 386 throws InvalidNodeRefException; 387 388 397 public ChildAssociationRef getPrimaryParent(NodeRef nodeRef) throws InvalidNodeRefException; 398 399 408 public AssociationRef createAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) 409 throws InvalidNodeRefException, AssociationExistsException; 410 411 418 public void removeAssociation(NodeRef sourceRef, NodeRef targetRef, QName assocTypeQName) 419 throws InvalidNodeRefException; 420 421 434 public List <AssociationRef> getTargetAssocs(NodeRef sourceRef, QNamePattern qnamePattern) 435 throws InvalidNodeRefException; 436 437 450 public List <AssociationRef> getSourceAssocs(NodeRef targetRef, QNamePattern qnamePattern) 451 throws InvalidNodeRefException; 452 453 464 public Path getPath(NodeRef nodeRef) throws InvalidNodeRefException; 465 466 477 public List <Path> getPaths(NodeRef nodeRef, boolean primaryOnly) throws InvalidNodeRefException; 478 } 479 | Popular Tags |