jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r933209 - in /jackrabbit/branches/2.1: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ jackrabbit-standalone/src/main/java/org/apache/jackrabbit/...
Date Mon, 12 Apr 2010 12:09:47 GMT
Author: jukka
Date: Mon Apr 12 12:09:46 2010
New Revision: 933209

URL: http://svn.apache.org/viewvc?rev=933209&view=rev
Log:
2.1: Merged revisions 933144, 933197 and 933203 (JCR-2457 and JCR-2600)

Added:
    jackrabbit/branches/2.1/jackrabbit-standalone/src/main/resources/logback-cli.xml
      - copied unchanged from r933197, jackrabbit/trunk/jackrabbit-standalone/src/main/resources/logback-cli.xml
Modified:
    jackrabbit/branches/2.1/   (props changed)
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
    jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
    jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/JcrClient.java

Propchange: jackrabbit/branches/2.1/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Apr 12 12:09:46 2010
@@ -2,4 +2,4 @@
 /jackrabbit/sandbox/JCR-1456:774917-886178
 /jackrabbit/sandbox/JCR-2170:812417-816332
 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863
-/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319
+/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=933209&r1=933208&r2=933209&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Mon Apr 12 12:09:46 2010
@@ -1504,6 +1504,9 @@ public class RepositoryImpl extends Abst
                     session.setAttribute(name, sc.getAttribute(name));
                 }
             }
+
+            log.info("User {} logged in to workspace {}",
+                    session.getUserID(), workspaceName);
             return session;
         } catch (SecurityException se) {
             throw new LoginException("Unable to access authentication information", se);

Modified: jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java?rev=933209&r1=933208&r2=933209&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
Mon Apr 12 12:09:46 2010
@@ -296,7 +296,7 @@ public abstract class AbstractLoginModul
         // check the availability of Credentials
         Credentials creds = getCredentials();
         if (creds == null) {
-            log.warn("No credentials available -> try default (anonymous) authentication.");
+            log.debug("No credentials available -> try default (anonymous) authentication.");
         }
         try {
             Principal userPrincipal = getPrincipal(creds);

Modified: jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java?rev=933209&r1=933208&r2=933209&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/Main.java
Mon Apr 12 12:09:46 2010
@@ -22,6 +22,7 @@ import java.io.InputStream;
 import java.net.URL;
 
 import javax.jcr.Repository;
+import javax.jcr.Session;
 
 import org.apache.commons.chain.Context;
 import org.apache.commons.chain.impl.ContextBase;
@@ -121,10 +122,13 @@ public class Main {
         } else if (command.hasOption("license")) {
             copyToOutput("/META-INF/LICENSE.txt");
         } else if (command.hasOption("cli")) {
+            System.setProperty("logback.configurationFile", "logback-cli.xml");
+
             Context context = new ContextBase();
             String uri = command.getOptionValue("cli");
             Repository repository = JcrUtils.getRepository(uri);
             CommandHelper.setRepository(context, repository, uri);
+
             new JcrClient(context).runInteractive();
         } else {
             message("Welcome to Apache Jackrabbit!");

Modified: jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/JcrClient.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/JcrClient.java?rev=933209&r1=933208&r2=933209&view=diff
==============================================================================
--- jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/JcrClient.java
(original)
+++ jackrabbit/branches/2.1/jackrabbit-standalone/src/main/java/org/apache/jackrabbit/standalone/cli/JcrClient.java
Mon Apr 12 12:09:46 2010
@@ -314,8 +314,9 @@ public class JcrClient {
             return bundle.getString("phrase.not.connected");
         }
 
+        boolean unsaved = false;
         try {
-            CommandHelper.getSession(ctx);
+            unsaved = CommandHelper.getSession(ctx).hasPendingChanges();
         } catch (CommandException e) {
             return bundle.getString("phrase.not.logged.in");
         }
@@ -323,12 +324,18 @@ public class JcrClient {
         try {
             Node n = CommandHelper.getCurrentNode(ctx);
             // the current node might be Invalid
+            String path;
             try {
-                return n.getPath();
+                path = n.getPath();
             } catch (InvalidItemStateException e) {
                 CommandHelper.setCurrentNode(ctx, CommandHelper.getSession(ctx)
                     .getRootNode());
-                return CommandHelper.getCurrentNode(ctx).getPath();
+                path = CommandHelper.getCurrentNode(ctx).getPath();
+            }
+            if (unsaved) {
+                return path + "*";
+            } else {
+                return path;
             }
         } catch (CommandException e) {
             return bundle.getString("phrase.not.logged.in");



Mime
View raw message