Fork me on GitHub

Commons RepositoryUtil


Static utility class containing repository related methods. It has with following methods:

   * Get a session from a new login into a HippoRepository.
  Session getSession(String repoConnection, String userName, String password)

  void removeNode(Session session, String fullPath)
  Node getNodeByPath(Session session, String absPath)

  Node ensureParent(Node parent, String relFolderPath)
  Node ensureParent(Node parent, String relFolderPath, Map<String, Object> properties)
  Node ensureParent(Node parent, String relFolderPath, String folderType, Map<String, Object> properties)

   * For given path, create a list of separate node names.
  List<String> folderParts(String folderPath)

  Node createFolder(Node parent, String type, String folderName, Map<String, Object> properties)
  Node createHardHandle(Node parent, String name, boolean overwrite)
  Node createDocumentNode(Node parent, String name, String type)

  void setBinaryData(Node node, InputStream data, String mimeType)

  void addWorkflow(Node node)

  Node getDocumentVariant(Node handle, String primaryType, String hippoStdState)