站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBOSS Portal 2.2 API 英文版文档

RepositoryUtil - JBOSS Portal 2.2 API 英文版文档


org.jboss.portal.cms.util
Class RepositoryUtil

java.lang.Object
  extended byorg.jboss.portal.cms.util.RepositoryUtil

public class RepositoryUtil
extends java.lang.Object

Helper class for JCR Repositories.


Constructor Summary
RepositoryUtil()
           
 
Method Summary
static javax.jcr.Repository getRepository(java.lang.String repositoryName)
          Retrieves a handle on the repository.
static javax.jcr.Session login(javax.jcr.Repository repository, java.lang.String user, java.lang.String password)
          Handles authentication for the specified repository.
static void registerCustomNodeTypes(javax.jcr.Repository repository)
          Creates the custom nodetypes needed by the portalcms.
static void registerRepository(java.lang.String repositoryName, java.lang.String configFile, java.lang.String homeDir)
          Registers the repository, also creates it if it does not exist on the FS.
static void unregisterRepository(java.lang.String repositoryName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryUtil

public RepositoryUtil()
Method Detail

registerCustomNodeTypes

public static void registerCustomNodeTypes(javax.jcr.Repository repository)
                                    throws java.lang.Exception
Creates the custom nodetypes needed by the portalcms.

Parameters:
repository -
Throws:
java.lang.Exception

registerRepository

public static void registerRepository(java.lang.String repositoryName,
                                      java.lang.String configFile,
                                      java.lang.String homeDir)
                               throws javax.jcr.RepositoryException,
                                      javax.naming.NamingException
Registers the repository, also creates it if it does not exist on the FS. This method will not create the custom nodetypes!

Parameters:
repositoryName -
configFile -
homeDir -
Throws:
javax.jcr.RepositoryException
javax.naming.NamingException

unregisterRepository

public static void unregisterRepository(java.lang.String repositoryName)
                                 throws javax.naming.NamingException
Throws:
javax.naming.NamingException

getRepository

public static javax.jcr.Repository getRepository(java.lang.String repositoryName)
Retrieves a handle on the repository.

Parameters:
repositoryName -
Returns:
repository

login

public static javax.jcr.Session login(javax.jcr.Repository repository,
                                      java.lang.String user,
                                      java.lang.String password)
Handles authentication for the specified repository.

Parameters:
repository -
user -
password -
Returns:
session