[java-identity-provider COMMIT] in /trunk/idp-attribute-cli: pom.xml src/main/java/net/shibboleth/idp/attribute/cli/M...

noreply at shibboleth.net noreply at shibboleth.net
Tue Apr 2 17:10:51 EDT 2013


Author: scantor
Date: Tue Apr  2 17:10:51 2013
New Revision: 4385

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4385&view=rev
Log:
A webflow illustrating Spring-aware and nonaware actions, run from command line.

Added:
    trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/OutputAttributes.java   (with props)
    trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/StaticResolver.java   (with props)
    trunk/idp-attribute-cli/src/main/resources/conf/cli-flow-beans.xml   (with props)
    trunk/idp-attribute-cli/src/main/resources/conf/cli-flow.xml   (with props)
    trunk/idp-attribute-cli/src/main/resources/conf/logging.xml
      - copied, changed from r4364, trunk/idp-attribute-cli/src/main/resources/logging.xml
Modified:
    trunk/idp-attribute-cli/pom.xml
    trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java
    trunk/idp-attribute-cli/src/main/resources/conf/internal.xml
    trunk/idp-attribute-cli/src/main/resources/conf/webflow-config.xml
    trunk/idp-attribute-cli/src/main/resources/logging.xml

Modified: trunk/idp-attribute-cli/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-cli/pom.xml?rev=4385&r1=4384&r2=4385&view=diff
==============================================================================
--- trunk/idp-attribute-cli/pom.xml (original)
+++ trunk/idp-attribute-cli/pom.xml Tue Apr  2 17:10:51 2013
@@ -41,7 +41,13 @@
         <dependency>
             <groupId>org.apache.velocity</groupId>
             <artifactId>velocity</artifactId>
-            <scope>provided</scope>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.shibboleth.idp</groupId>
+            <artifactId>idp-profile-impl</artifactId>
+            <version>3.0-SNAPSHOT</version>
+            <scope>runtime</scope>
         </dependency>
     </dependencies>
     

Modified: trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java?rev=4385&r1=4384&r2=4385&view=diff
==============================================================================
--- trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java (original)
+++ trunk/idp-attribute-cli/src/main/java/net/shibboleth/idp/attribute/cli/Main.java Tue Apr  2 17:10:51 2013
@@ -32,6 +32,7 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationContext;
+import org.springframework.webflow.executor.FlowExecutionResult;
 import org.springframework.webflow.executor.FlowExecutor;
 import org.springframework.webflow.test.MockExternalContext;
 
@@ -76,7 +77,17 @@
         ApplicationContext appCtx = buildApplicationContext();
         
         FlowExecutor flowExecutor = appCtx.getBean("flowExecutor", FlowExecutor.class);
-        flowExecutor.launchExecution("myFlow", null, new MockExternalContext());
+        MockExternalContext mockCtx = new MockExternalContext();
+        FlowExecutionResult result = flowExecutor.launchExecution("cli-flow", null, mockCtx);
+        if (result.isEnded()) {
+            if ("end".equals(result.getOutcome().getId())) {
+                System.out.print(mockCtx.getMockResponseWriter().toString());
+            } else {
+                System.err.println("Flow did not end successfully.");
+            }
+        } else {
+            System.err.println("Flow did not end.");
+        }
     }
 
     /**

Modified: trunk/idp-attribute-cli/src/main/resources/conf/internal.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-cli/src/main/resources/conf/internal.xml?rev=4385&r1=4384&r2=4385&view=diff
==============================================================================
--- trunk/idp-attribute-cli/src/main/resources/conf/internal.xml (original)
+++ trunk/idp-attribute-cli/src/main/resources/conf/internal.xml Tue Apr  2 17:10:51 2013
@@ -6,7 +6,7 @@
         <property name="id" value="shibboleth.LogbackLogging"/>
         <property name="loggingConfiguration">
             <bean class="net.shibboleth.utilities.java.support.resource.ClasspathResource" init-method="initialize" destroy-method="destroy">
-                <constructor-arg value="logging.xml"/>
+                <constructor-arg value="conf/logging.xml"/>
             </bean>
         </property>
         <property name="reloadCheckDelay" value="0"/>
@@ -50,9 +50,9 @@
                         <value>http://apache.org/xml/properties/security-manager</value>
                     </key>
                     <!-- Works for Xerces. -->
-                    <!-- <bean id="shibboleth.XercesSecurityManager" class="org.apache.xerces.util.SecurityManager"/> -->
+                    <bean id="shibboleth.XercesSecurityManager" class="org.apache.xerces.util.SecurityManager"/>
                     <!-- Sun's version. -->

[... 43 lines stripped ...]


More information about the commits mailing list