Package org.apache.jackrabbit.core

Examples of org.apache.jackrabbit.core.TransientRepository.login()


   
    public static void main(String[] args) throws Exception {
        TransientRepository repository = new TransientRepository();     
        Session session = null;
        try {
            session = repository.login( new SimpleCredentials("nicolas.belisle@paypal.com", "perfectpassword4paypal".toCharArray()));
           
            Node rootNode = session.getRootNode();
            Node testNode = rootNode.addNode("test");
            testNode.addMixin("mix:versionable");
            String vhUuid = testNode.getVersionHistory().getUUID();
View Full Code Here


public class VersioningTest {
   
    public static void main(String[] args) throws Exception {
        //RepositoryConfig config = RepositoryConfig.create(new FileInputStream(new File("C:/tmp/repository.xml")), "C:/tmp/repository");
        Repository repository = new TransientRepository();//RepositoryImpl.create(config);
        Session session = repository.login( new SimpleCredentials("username", "password".toCharArray()) );
        try {
           
            String nodeName = "" + System.currentTimeMillis();
           
            Node rootNode = session.getRootNode();
View Full Code Here

     * @throws Exception
     *             if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login();
        try {
            String user = session.getUserID();
            String name = repository.getDescriptor(Repository.REP_NAME_DESC);
            System.out.println("Logged in as " + user + " to a " + name
                    + " repository.");
View Full Code Here

     * @throws Exception
     *             if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login(new SimpleCredentials("username",
                "password".toCharArray()));

        FileInputStream xml = new FileInputStream("src/main/resources/test.xml");
        try {
            Node root = session.getRootNode();
View Full Code Here

     * @throws Exception
     *             if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login(new SimpleCredentials("username",
                "password".toCharArray()));
        try {
            Node root = session.getRootNode();

            // Store content
View Full Code Here

     * @param args command line arguments (ignored)
     * @throws Exception if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login();
        try {
            String user = session.getUserID();
            String name = repository.getDescriptor(Repository.REP_NAME_DESC);
            System.out.println(
                    "Logged in as " + user + " to a " + name + " repository.");
View Full Code Here

     * @param args command line arguments (ignored)
     * @throws Exception if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login(
                new SimpleCredentials("username", "password".toCharArray()));
        try {
            Node root = session.getRootNode();

            // Store content
View Full Code Here

    RepositoryConf conf = getRepositoryConf();
   
    RepositoryConfig config = conf.createConfig("applications/test");
    config.init();
    TransientRepository repo = new TransientRepository(config);
    repo.login();
    repo.shutdown();
  }
 
  public void testStartRepoWithDefaultConfig() throws Exception {
    RepositoryConf conf = new RepositoryConf();
View Full Code Here

    System.out.println();
   
    RepositoryConfig config = conf.createConfig("applications/test2");
    config.init();
    TransientRepository repo = new TransientRepository(config);
    repo.login();
    repo.shutdown();
  }
}
View Full Code Here

     * @param args command line arguments (ignored)
     * @throws Exception if an error occurs
     */
    public static void main(String[] args) throws Exception {
        Repository repository = new TransientRepository();
        Session session = repository.login();
        try {
            String user = session.getUserID();
            String name = repository.getDescriptor(Repository.REP_NAME_DESC);
            System.out.println(
                    "Logged in as " + user + " to a " + name + " repository.");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.