JBoss Portal SVN: r12814 - in modules/authorization/trunk: core-components and 3 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-02-12 21:18:37 -0500 (Thu, 12 Feb 2009)
New Revision: 12814
Modified:
modules/authorization/trunk/common/pom.xml
modules/authorization/trunk/core-components/pom.xml
modules/authorization/trunk/enforcement/pom.xml
modules/authorization/trunk/http-profile/pom.xml
modules/authorization/trunk/policy-server/pom.xml
Log:
simplifying artifact names
Modified: modules/authorization/trunk/common/pom.xml
===================================================================
--- modules/authorization/trunk/common/pom.xml 2009-02-13 01:32:25 UTC (rev 12813)
+++ modules/authorization/trunk/common/pom.xml 2009-02-13 02:18:37 UTC (rev 12814)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-authz-common</artifactId>
+ <artifactId>common-api</artifactId>
<packaging>jar</packaging>
<name>JBoss Authorization Common</name>
<url>http://www.jboss.org</url>
Modified: modules/authorization/trunk/core-components/pom.xml
===================================================================
--- modules/authorization/trunk/core-components/pom.xml 2009-02-13 01:32:25 UTC (rev 12813)
+++ modules/authorization/trunk/core-components/pom.xml 2009-02-13 02:18:37 UTC (rev 12814)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-authz-core-components</artifactId>
+ <artifactId>core-components-api</artifactId>
<packaging>jar</packaging>
<name>JBoss Authorization Core Components</name>
<url>http://www.jboss.org</url>
@@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-common</artifactId>
+ <artifactId>common-api</artifactId>
<version>${project.version}</version>
</dependency>
Modified: modules/authorization/trunk/enforcement/pom.xml
===================================================================
--- modules/authorization/trunk/enforcement/pom.xml 2009-02-13 01:32:25 UTC (rev 12813)
+++ modules/authorization/trunk/enforcement/pom.xml 2009-02-13 02:18:37 UTC (rev 12814)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-authz-enforcement</artifactId>
+ <artifactId>enforcement</artifactId>
<packaging>jar</packaging>
<name>JBoss Authorization Policy Enforcement Point</name>
<url>http://www.jboss.org</url>
@@ -16,7 +16,7 @@
<dependencies>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-common</artifactId>
+ <artifactId>common-api</artifactId>
<version>${project.version}</version>
</dependency>
Modified: modules/authorization/trunk/http-profile/pom.xml
===================================================================
--- modules/authorization/trunk/http-profile/pom.xml 2009-02-13 01:32:25 UTC (rev 12813)
+++ modules/authorization/trunk/http-profile/pom.xml 2009-02-13 02:18:37 UTC (rev 12814)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-http-profile</artifactId>
+ <artifactId>http-profile</artifactId>
<packaging>jar</packaging>
<name>JBoss Authorization for the HTTP tier</name>
<url>http://www.jboss.org</url>
@@ -16,17 +16,17 @@
<dependencies>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-common</artifactId>
+ <artifactId>common-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-core-components</artifactId>
+ <artifactId>core-components-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-policy-server</artifactId>
+ <artifactId>policy-server</artifactId>
<version>${project.version}</version>
</dependency>
Modified: modules/authorization/trunk/policy-server/pom.xml
===================================================================
--- modules/authorization/trunk/policy-server/pom.xml 2009-02-13 01:32:25 UTC (rev 12813)
+++ modules/authorization/trunk/policy-server/pom.xml 2009-02-13 02:18:37 UTC (rev 12814)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
- <artifactId>jboss-authz-policy-server</artifactId>
+ <artifactId>policy-server</artifactId>
<packaging>jar</packaging>
<name>JBoss Authorization Policy Server</name>
<url>http://www.jboss.org</url>
@@ -16,17 +16,17 @@
<dependencies>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-common</artifactId>
+ <artifactId>common-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-core-components</artifactId>
+ <artifactId>core-components-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.security.authz</groupId>
- <artifactId>jboss-authz-enforcement</artifactId>
+ <artifactId>enforcement</artifactId>
<version>${project.version}</version>
</dependency>
17 years, 2 months
JBoss Portal SVN: r12813 - in modules/authorization/trunk/documentation/reference-guide/en: modules and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-02-12 20:32:25 -0500 (Thu, 12 Feb 2009)
New Revision: 12813
Modified:
modules/authorization/trunk/documentation/reference-guide/en/master.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml
Log:
Architecture Chapter
Modified: modules/authorization/trunk/documentation/reference-guide/en/master.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/master.xml 2009-02-12 12:33:40 UTC (rev 12812)
+++ modules/authorization/trunk/documentation/reference-guide/en/master.xml 2009-02-13 01:32:25 UTC (rev 12813)
@@ -20,4 +20,5 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/profiles.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/spi.xml" />
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/examples.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/sample.xml" />
</book>
\ No newline at end of file
Modified: modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml 2009-02-12 12:33:40 UTC (rev 12812)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml 2009-02-13 01:32:25 UTC (rev 12813)
@@ -9,33 +9,184 @@
</chapterinfo>
<title>Architecture</title>
<sect1>
- <title>Application Integration</title>
- <para>
- </para>
+ <title>Overall Architecture</title>
+ <para>
+ JBoss Authorization Server architecture consists of two components:
+ <itemizedlist>
+ <listitem>Application Framework</listitem>
+ <listitem>Authorization Server</listitem>
+ </itemizedlist>
+ </para>
<sect2>
- <title>Profiles</title>
- <para></para>
+ <title>Application Framework</title>
+ <para>
+ Application Framework consists of a Developer API that is used to integrate an Authorization layer for your application. This allows your Application
+ components to be free from any embedded Security Logic. The Framework consists of entities that can be used to create custom Authorization layers within the
+ context of your application, and with Profiles for infrastructure tiers that allows you to integrate Authorization layers as a simple drop in, without
+ requiring any coding.
+ </para>
+ <sect3>
+ <title>Profiles</title>
+ <para>
+ Profiles are complete implementations of an Authorization layer within the context of the infrastructure tier in question. Examples of such profiles
+ are the <emphasis>HTTP Profile</emphasis> for the HTTP tier, <emphasis>Portal Profile</emphasis> for a Portal/Portlet Container,
+ <emphasis>Seam Profile</emphasis> for a Web Tier, <emphasis>EJB Profile</emphasis> for the Service Tier, <emphasis>Hibernate/JPA Profile</emphasis> for the
+ Data Tier, etc
+ </para>
+ <para>
+ Each Profile will produce an Authorization Context with Attribute Values that make sense within the Context of that tier. Here is a simple
+ snapshot of what a "Permit" Authorization Context would look like
+ for a simple Policy Rule in each infrastructure tier:
+ <para>
+ <emphasis role="bold">"Allow Writing to a File '/developer/index.html', if User is in Role 'Developer'"</emphasis>:
+ <itemizedlist>
+ <listitem><emphasis>HTTP Profile</emphasis> :
+ <para>
+ <programlisting><![CDATA[
+ Resource Attributes: [urlPattern="/developer/index.html"]
+
+
+ Action Attributes: [parameter['action']="write"]
+
+
+ Subject Attributes: [roles={"project_manager", "developer"}]
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ <listitem><emphasis>EJB Profile</emphasis> :
+ <para>
+ <programlisting><![CDATA[
+ Resource Attributes: [Java Class="org.cms.CMS", Java Method="writeFile"]
+
+
+ Environment Attributes: [parameter['fileName']="/developer/index.html"]
+
+
+ Subject Attribute: [roles={"project_manager", "developer"}]
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ <listitem><emphasis>Hibernate Profile</emphasis> :
+ <para>
+ <programlisting><![CDATA[
+ Resource Attributes: [Java Class="org.cms.domain.File"]
+
+
+ Environment Attributes: [field['fileName']="/developer/index.html"]
+
+
+ Subject Attributes: [roles={"project_manager", "developer"}]
+ ]]>
+ </programlisting>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ Note: Which infrastructure profiles you decide to activate within a single Enterprise application is dependent upon the Security requirements
+ of the application, and the corresponding Policy makeup.
+ </para>
+ <para>
+ Profile Implementations are expected to be complete with the following features:
+ <itemizedlist>
+ <listitem><emphasis>A Drop In Authorization Layer</emphasis></listitem>
+ <listitem><emphasis>Developer Components built on top of the Developer API to develop Policy Provisioning functions (typically used for building Custom GUI)</emphasis></listitem>
+ <listitem><emphasis>An Optional tier-specific Generic GUI for Policy Provisioning</emphasis></listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
+ <sect3>
+ <title>Developer API</title>
+ <para>
+ A Developer API is provided by the Framework to develop custom Authorization functionality or for developing Authorization Profiles discussed above.
+ The Developer API is split into two types. The very low-level API which presents components for the Authorization Concepts discussed in the
+ <emphasis><link linkend="concepts">Concepts Chapter</link></emphasis>. It also provides a higher-level API consisting of Application level components that are built on top of the
+ low-level API. The Authorization Server comes packaged with a set of core components which will be discussed in more detail in the
+ <emphasis><link linkend="api">Developer API Chapter</link></emphasis>
+ </para>
+ <para>
+ Developers can easily create their own custom components using these low-level and/or higher-level components and have these components easily processed by the Authorization Server.
+ </para>
+ <para>
+ The Developer API is used to create the following Authorization functionality:
+ <itemizedlist>
+ <listitem>
+ <emphasis>Custom Authorization Layer</emphasis>
+ </listitem>
+ <listitem>
+ <emphasis>Custom Provisioning Functionality such as Security GUI, Command Line tools, etc</emphasis>
+ </listitem>
+ <listitem>
+ <emphasis>Custom Components</emphasis>
+ </listitem>
+ <listitem>
+ <emphasis>More Profiles</emphasis>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect3>
</sect2>
<sect2>
- <title>Developer API</title>
- <para></para>
- </sect2>
- </sect1>
- <sect1>
- <title>Authorization Server</title>
- <para>
- </para>
- <sect2>
- <title>Enforcement</title>
- <para></para>
- </sect2>
- <sect2>
- <title>Policy Provisioning</title>
- <para></para>
- </sect2>
- <sect2>
- <title>Policy Store SPI</title>
- <para></para>
- </sect2>
- </sect1>
-</chapter>
+ <title>Authorization Server</title>
+ <para>
+ This component provides the runtime, the rules engine, and policy store which performs evaluation of Authorization requests
+ against the Authorization Policies for the applications.
+ It is used by the Application/Profile-level Authorization layer to route requests and correspondingly receive "Permit" or "Deny" responses.
+ The functionality of the Server is split into the following concerns:
+ </para>
+ <sect3>
+ <title>Enforcement</title>
+ <para>
+ This component is responsible for processing incoming Authorization requests. It routes these requests to the rules engine, which in turn
+ responds with a 'Permit' or 'Deny' state for the request.
+ </para>
+ <para>
+ The rules engine used is standards-compliant and uses the industry supported XACML standard. In a nutshell, XACML is an XML based Security Rules
+ Language, use to define Security Policies. It is also comprehensive in providing robust concepts and architecture recommendations, but its main focus
+ is the XML-spec to define Security Policies. This system is designed in accordance with these architectural recommendations, and also uses the
+ XACML XML-spec to represent the Security Policies.
+ </para>
+ <para>
+ It must be noted that the XACML spec is vast and the XML is extremely complex. However, the developers are completely insulated from any XACML XML
+ via the Developer API. The Developer API is not the same thing as a JAXB model of the XACML spec. The Developer API consists of object oriented
+ components from the Application domain. The Authorization runtime internally takes care of converting these components into XACML constructs, to be used
+ by the Authorization Server.
+ </para>
+ <para>
+ The Authorization Server uses the JAXB model provided by the JBossXACML stack, and the XACML implementation provided by Sun Microsystems.
+ </para>
+ </sect3>
+ <sect3>
+ <title>Policy Provisioning</title>
+ <para>
+ This component processes Provisioning requests from Applications. This results in runtime changes to Security policies, and immediate enforcement
+ of these policies, without requiring any restarting of the infrastructure.
+ </para>
+ </sect3>
+ <sect3>
+ <title>Policy Store SPI</title>
+ <para>
+ This SPI allows storage agnosticity for the Security Policies managed by the Server. By default, it uses relational database storage. However using the SPI
+ you can store Policies inside JCR Repositories, LDAP repositories, or other storage locations.
+ </para>
+ </sect3>
+ <sect3>
+ <title>Deployment Options</title>
+ <para>
+ The Authorization Server can be deployed and accessed by Enterprise Applications in 2 ways:
+ <emphasis>Same VM Mode</emphasis>,
+ <emphasis>Different VM mode</emphasis>,
+ </para>
+ <sect4>
+ <title>Same VM Mode</title>
+ <para>In this mode the Authorization Server is deployed in the same VM as a JBoss Microcontainer Service. All service requests are local method invocations.</para>
+ </sect4>
+ <sect4>
+ <title>Different VM Mode</title>
+ <para>In this mode the Authorization Server is deployed in a separate VM than its applications. In this mode, service requests are made via a Remote interface such as REST</para>
+ </sect4>
+ </sect3>
+ </sect2>
+ </sect1>
+</chapter>
\ No newline at end of file
17 years, 2 months
JBoss Portal SVN: r12812 - modules/authorization/trunk/documentation/reference-guide/en/modules.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-02-12 07:33:40 -0500 (Thu, 12 Feb 2009)
New Revision: 12812
Modified:
modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml
Log:
Concepts chapter
Modified: modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml 2009-02-11 23:15:40 UTC (rev 12811)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml 2009-02-12 12:33:40 UTC (rev 12812)
@@ -10,42 +10,88 @@
<title>Concepts</title>
<sect1>
<title>Resource</title>
- <para>
+ <para>
+ A Data, Service, or a System component.
+ </para>
+ <para>
+ <emphasis role="bold">Examples</emphasis> : a HTTP URL, a Servlet, a Portlet, a POJO (Plain Old Java Object), a Java Method, a Java Field, etc
</para>
</sect1>
<sect1>
<title>Action</title>
<para>
+ An operation on a resource.
</para>
+ <para>
+ <emphasis role="bold">Examples</emphasis> : CRUD (Create, Read, Update, Delete), HTTP GET, HTTP POST, PORTLET VIEW, PORTLET ACTION, etc
+ </para>
</sect1>
<sect1>
<title>Subject</title>
- <para>
+ <para>
+ An actor.
</para>
+ <para>
+ <emphasis role="bold">Examples</emphasis> : Authenticated User, Anonymous User, a Machine, etc
+ </para>
</sect1>
<sect1>
<title>Environment</title>
<para>
+ The set of attributes that are relevant to an authorization decision and are independent of a particular subject, resource, or action.
</para>
+ <para>
+ <emphasis role="bold">Examples</emphasis> : Current Date and/or Time, Application Data in a HTTP Session, the parameters passed to a Java method call, etc
+ </para>
</sect1>
<sect1>
<title>Attribute</title>
- <para>
- </para>
+ <para>
+ A characteristic of a Resource, Action, Subject or Environment which is referenced within a Policy Rule or a Policy Target. Attributes are runtime information
+ which are presented with an Authorization Context during Enforcement. Within the policy definition, conditions, logic, and target matching are applied to
+ information referenced by Attributes. The concept of Attributes allows Authorization to be flexible and allows including arbitrary runtime information during
+ the decision process.
+ </para>
+ <para>
+ <emphasis role="bold">Resource Examples</emphasis> : Unique URI, Resource Id, File Name, etc
+ </para>
+ <para>
+ <emphasis role="bold">Action Examples</emphasis> : CRUD (Create, Read, Update, Delete), HTTP GET, HTTP POST, etc
+ </para>
+ <para>
+ <emphasis role="bold">Subject Examples</emphasis> : Username, Roles for this User, IP Address, Authentication Method, Authentication Time, etc
+ </para>
+ <para>
+ <emphasis role="bold">Environment Examples</emphasis> : Current Date and/or Time, etc
+ </para>
</sect1>
<sect1>
<title>Policy</title>
- <para>
+ <para>
+ A security policy consisting of a target and multiple rules. An Enterprise application will have multiple policies stored in the system. Enforcement
+ requests are evaluated by applying the logic specified within these policies. A Policy Evaluation results in a Permit or Deny State.
</para>
</sect1>
<sect1>
<title>Target</title>
<para>
+ The set of Enforcement requests identified by policy definitions of Resource, Subject, and Action that a Policy or a Rule is intended to evalute.
+ Simply put, Target definition consists of logic that determines whether a particular Policy or Rule should be evaluated for the incoming Enforcement request.
</para>
</sect1>
<sect1>
<title>Rule</title>
<para>
+ A Policy Component which consists of the following:
</para>
+ <para>
+ <emphasis>Target</emphasis> : To determine if the Rule should be evaluated for the incoming Enforcement request.
+ </para>
+ <para>
+ <emphasis>Expression</emphasis> : Encapsulates the Logic that must be evaluated resulting in a Boolean (true|false) result.
+ </para>
+ <para>
+ <emphasis>Effect</emphasis> : Decides what to do (Permit or Deny), if this Rule evaluates to true.
+ </para>
</sect1>
</chapter>
17 years, 2 months
JBoss Portal SVN: r12811 - in modules/authorization/trunk: documentation/reference-guide/en and 1 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2009-02-11 18:15:40 -0500 (Wed, 11 Feb 2009)
New Revision: 12811
Added:
modules/authorization/trunk/documentation/reference-guide/en/modules/api.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/examples.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/introduction.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/profiles.xml
modules/authorization/trunk/documentation/reference-guide/en/modules/spi.xml
Modified:
modules/authorization/trunk/.classpath
modules/authorization/trunk/documentation/reference-guide/en/master.xml
Log:
Reference Guide Skeleton
Modified: modules/authorization/trunk/.classpath
===================================================================
--- modules/authorization/trunk/.classpath 2009-02-11 21:11:47 UTC (rev 12810)
+++ modules/authorization/trunk/.classpath 2009-02-11 23:15:40 UTC (rev 12811)
@@ -19,7 +19,8 @@
<classpathentry kind="src" path="http-profile/src/main/java"/>
<classpathentry kind="src" path="http-profile/src/main/resources"/>
<classpathentry kind="src" path="http-profile/src/test/java"/>
- <classpathentry kind="src" path="http-profile/src/test/resources"/>
+ <classpathentry kind="src" path="http-profile/src/test/resources"/>
+ <classpathentry kind="src" path="documentation/reference-guide/en/modules"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/asm/asm/1.5.3/asm-1.5.3.jar"/>
<classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1_3/cglib-2.1_3.jar"/>
Modified: modules/authorization/trunk/documentation/reference-guide/en/master.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/master.xml 2009-02-11 21:11:47 UTC (rev 12810)
+++ modules/authorization/trunk/documentation/reference-guide/en/master.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -3,18 +3,21 @@
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<book lang="en">
<bookinfo>
- <title>Change Title in master.xml</title>
- <subtitle>Change SubTitle in master.xml</subtitle>
- <releaseinfo>Change Release Info in master.xml</releaseinfo>
- <releaseinfo>Change Release Info Date in master.xml</releaseinfo>
+ <title>JBoss Authorization Server</title>
+ <subtitle>Reference Guide</subtitle>
+ <releaseinfo>Preview Release</releaseinfo>
<author>
- <firstname>Your first name</firstname>
- <surname>Your last name</surname>
- <email>your.email(a)your.domain.com</email>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
</author>
</bookinfo>
<toc/>
-
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/sample.xml" />
-
-</book>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/introduction.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/concepts.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/architecture.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/api.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/profiles.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/spi.xml" />
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="modules/examples.xml" />
+</book>
\ No newline at end of file
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/api.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/api.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/api.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="api">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Developer API</title>
+ <sect1>
+ <title>Developer API</title>
+ <para>
+ </para>
+ </sect1>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/architecture.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="architecture">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Architecture</title>
+ <sect1>
+ <title>Application Integration</title>
+ <para>
+ </para>
+ <sect2>
+ <title>Profiles</title>
+ <para></para>
+ </sect2>
+ <sect2>
+ <title>Developer API</title>
+ <para></para>
+ </sect2>
+ </sect1>
+ <sect1>
+ <title>Authorization Server</title>
+ <para>
+ </para>
+ <sect2>
+ <title>Enforcement</title>
+ <para></para>
+ </sect2>
+ <sect2>
+ <title>Policy Provisioning</title>
+ <para></para>
+ </sect2>
+ <sect2>
+ <title>Policy Store SPI</title>
+ <para></para>
+ </sect2>
+ </sect1>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/concepts.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="concepts">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Concepts</title>
+ <sect1>
+ <title>Resource</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Action</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Subject</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Environment</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Attribute</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Policy</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Target</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Rule</title>
+ <para>
+ </para>
+ </sect1>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/examples.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/examples.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/examples.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="examples">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Examples</title>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/introduction.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/introduction.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/introduction.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="introduction">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Introduction</title>
+ <sect1>
+ <title>Authorization</title>
+ <para>
+ Once a <emphasis role="bold">Subject</emphasis> (an Identity, Machine, etc) is authenticated by a system, <emphasis role="bold">Authorization</emphasis> is the security aspect that is used to determine:
+ "What resources are they allowed access to within the system?"
+ </para>
+ <para>
+ Any Enterprise application requires flexible Authorization from its Security infrastructure with the following characteristics:
+ <itemizedlist>
+ <listitem>Clean Separation between Security Logic and Application Logic</listitem>
+ <listitem>Flexibility to apply Security Logic to arbitrary Runtime information</listitem>
+ <listitem>Runtime Management of Security Policy</listitem>
+ <listitem>A user friendly Developer API</listitem>
+ </itemizedlist>
+ </para>
+ <sect2>
+ <title>Clean Separation between Security Logic and Application Logic</title>
+ <para>
+
+ </para>
+ </sect2>
+ <sect2>
+ <title>Flexibility to apply Security Logic to arbitrary Runtime information</title>
+ <para>
+
+ </para>
+ </sect2>
+ <sect2>
+ <title>Runtime Management of Security Policy</title>
+ <para>
+
+ </para>
+ </sect2>
+ <sect2>
+ <title>A user friendly Developer API</title>
+ <para>
+
+ </para>
+ </sect2>
+ </sect1>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/profiles.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/profiles.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/profiles.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="profiles">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Profiles</title>
+ <sect1>
+ <title>Http Profile</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Portal Profile</title>
+ <para>
+ </para>
+ </sect1>
+ <sect1>
+ <title>Seam Profile</title>
+ <para>
+ </para>
+ </sect1>
+</chapter>
Added: modules/authorization/trunk/documentation/reference-guide/en/modules/spi.xml
===================================================================
--- modules/authorization/trunk/documentation/reference-guide/en/modules/spi.xml (rev 0)
+++ modules/authorization/trunk/documentation/reference-guide/en/modules/spi.xml 2009-02-11 23:15:40 UTC (rev 12811)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="spi">
+ <chapterinfo>
+ <author>
+ <firstname>Sohil</firstname>
+ <surname>Shah</surname>
+ <email>sshah(a)redhat.com</email>
+ </author>
+ </chapterinfo>
+ <title>Policy Store SPI</title>
+ <sect1>
+ <title>Policy Store SPI</title>
+ <para>
+ </para>
+ </sect1>
+</chapter>
17 years, 2 months
JBoss Portal SVN: r12810 - in branches/JBoss_Portal_Branch_2_7: theme/src/bin/portal-ajax-war/dyna and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-11 16:11:47 -0500 (Wed, 11 Feb 2009)
New Revision: 12810
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js
Log:
- Use namespace instead of base 64 encoding of window id (to avoid an issue with prototype 1.6.0.3 and Safari, see http://prototype.lighthouseapp.com/projects/8886/tickets/497-prototype-v1... for more details).
- Minor optimizations in dyna.js.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-02-11 18:20:48 UTC (rev 12809)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/theme/WindowContextFactory.java 2009-02-11 21:11:47 UTC (rev 12810)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -25,11 +25,11 @@
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.core.controller.ControllerContext;
-import org.jboss.portal.core.model.portal.PortalObjectPath;
import org.jboss.portal.core.model.portal.Window;
import org.jboss.portal.core.model.portal.command.action.InvokePortletWindowRenderCommand;
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.content.WindowRendition;
+import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
import org.jboss.portal.server.ServerInvocationContext;
import org.jboss.portal.server.request.URLContext;
import org.jboss.portal.server.request.URLFormat;
@@ -84,7 +84,7 @@
//
return new WindowContext(
- window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT),
+ PortletUtils.generateNamespaceFrom(window.getId().toString()),
region,
order,
windowResult);
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-02-11 18:20:48 UTC (rev 12809)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-02-11 21:11:47 UTC (rev 12810)
@@ -1,4 +1,28 @@
-function sendData(action, windowId, fromPos, fromRegionId, toPos, toRegionId) {
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+
+function sendData(action, windowId, fromPos, fromRegionId, toPos, toRegionId)
+{
var options = {
requestHeaders: ["ajax","true","bilto","toto"],
method: "post",
@@ -21,31 +45,35 @@
new Ajax.Request(server_base_url + "/ajax", options);
}
-function snapshot() {
+function snapshot()
+{
// Find draggable regions
- var regions_on_page = $$(".dnd-region");
+ var regions_on_page = $$(".dnd-region");
// Save current state in the DOM itself
- for(var i = 0;i < regions_on_page.length;i++) {
+ for (var i = 0; i < regions_on_page.length; i++)
+ {
var regionDiv = regions_on_page[i]
- for (var j = 0;j < regionDiv.childNodes.length;j++) {
+ for (var j = 0; j < regionDiv.childNodes.length; j++)
+ {
var child = regionDiv.childNodes[j];
child["regionId"] = regionDiv.id;
child["pos"] = j;
- }
+ }
}
}
// Check that the URL starts with the provided prefix
-function isURLAccepted(url) {
+function isURLAccepted(url)
+{
var indexOfSessionId = server_base_url.indexOf(";jsessionid");
if (indexOfSessionId > 0)
{
- server_base_url = server_base_url.substring(0,indexOfSessionId-";jsessionid".length-1);
+ server_base_url = server_base_url.substring(0, indexOfSessionId - ";jsessionid".length - 1);
}
-
+
if (url.indexOf("http://") == 0)
{
var indexOfSlash = url.indexOf("/", "http://".length);
@@ -79,7 +107,8 @@
var container = Element.up(source, "div.dyna-window");
// We found the window
- if (container != null) {
+ if (container != null)
+ {
//
var options = new Object();
@@ -90,7 +119,8 @@
{
// Check we can handle this URL
- if (isURLAccepted(source.href)) {
+ if (isURLAccepted(source.href))
+ {
// Set URL
url = source.href;
@@ -106,23 +136,28 @@
{
// Find enclosing form
var current = source.parentNode;
- while (current.nodeName != 'FORM' && current.nodeName != 'BODY') {
+ while (current.nodeName != 'FORM' && current.nodeName != 'BODY')
+ {
current = current.parentNode;
}
// Check we have a form and use it
- if (current.nodeName == 'FORM') {
+ if (current.nodeName == 'FORM')
+ {
var enctype = current.enctype
// We don't handle file upload for now
- if (enctype != "multipart/form-data") {
+ if (enctype != "multipart/form-data")
+ {
// Check it is a POST
- if (current.method.toLowerCase() == "post") {
+ if (current.method.toLowerCase() == "post")
+ {
// Check we can handle this URL
- if (isURLAccepted(current.action)) {
+ if (isURLAccepted(current.action))
+ {
// Set URL
url = current.action;
@@ -139,7 +174,8 @@
}
// Handle links here
- if (url != null) {
+ if (url != null)
+ {
// Setup headers
var headers = ["ajax","true"];
@@ -170,7 +206,7 @@
// Different than 1 is not good
if (matchingElt != null)
{
- var dstContainer = document.getElementById(id);
+ var dstContainer = matchingElt;
if (dstContainer != null)
{
// Get markup fragment
@@ -225,46 +261,47 @@
*/
function copyInnerHTML(srcContainer, dstContainer, className)
{
- var srcs = srcContainer.select("." + className);
+ var classSelector = "." + className;
+ var srcs = srcContainer.select(classSelector);
if (srcs.length == 1)
{
var src = srcs[0];
//
- var dsts = dstContainer.select("." + className);
+ var dsts = dstContainer.select(classSelector);
if (dsts.length == 1)
{
var dst = dsts[0];
- // Remove existing non attribute children in destination
- var dstChildren = dst.childNodes;
- var copy = new Array();
- for (var i = 0;i < dstChildren.length;i++)
- {
- var dstChild = dstChildren.item(i);
- if (dstChild.nodeType != 2)
- {
- copy[i] = dstChildren.item(i);
- }
- }
- for (var i = 0;i < copy.length;i++)
- {
- Element.remove(copy[i]);
- }
+ // Remove existing non attribute children in destination
+ var dstChildren = dst.childNodes;
+ var copy = new Array();
+ for (var i = 0; i < dstChildren.length; i++)
+ {
+ var dstChild = dstChildren.item(i);
+ if (dstChild.nodeType != 2)
+ {
+ copy[i] = dstChildren.item(i);
+ }
+ }
+ for (var i = 0; i < copy.length; i++)
+ {
+ Element.remove(copy[i]);
+ }
- // Move src non attribute children to the destination
- while (src.hasChildNodes())
- {
- var srcChild = src.firstChild;
- if (srcChild.nodeType != 2)
- {
- dst.appendChild(srcChild);
- }
- else
- {
- src.removeChild(srcChild);
- }
- }
+ // Move src non attribute children to the destination
+ while (src.hasChildNodes())
+ {
+ var srcChild = src.firstChild;
+ if (srcChild.nodeType != 2)
+ {
+ dst.appendChild(srcChild);
+ }
+ else
+ {
+ src.removeChild(srcChild);
+ }
+ }
}
else
{
@@ -318,15 +355,18 @@
//var regions_on_page = document.getElementsByClassName("dnd-region");
// Create draggable regions
- for(var i = 0;i < regions_on_page.length;i++) {
+ for (var i = 0; i < regions_on_page.length; i++)
+ {
var region = regions_on_page[i];
- if(typeof Sortable != 'undefined'){
+ if (typeof Sortable != 'undefined')
+ {
Sortable.create(region, {dropOnEmpty:true,handle:"dnd-handle",tag:"div",containment:regions_on_page,constraint:false,hoverclass:"dnd-droppable"});
}
}
//
- if(typeof Draggables != 'undefined'){
+ if (typeof Draggables != 'undefined')
+ {
Draggables.addObserver(new WindowMoveObserver());
}
//
@@ -337,7 +377,8 @@
// Add listener for the dyna windows on the dyna-window element
// and not async-window as this one will have its markup replaced
- for(var i = 0;i < portlets_on_page.length;i++) {
+ for (var i = 0; i < portlets_on_page.length; i++)
+ {
var portlet = Element.up(portlets_on_page[i]);
Event.observe(portlet, "click", bilto);
}
17 years, 2 months
JBoss Portal SVN: r12809 - in branches/JBoss_Portal_Branch_2_7: core/src/main/org/jboss/portal/core/controller/classic and 3 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2009-02-11 13:20:48 -0500 (Wed, 11 Feb 2009)
New Revision: 12809
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js
Log:
- Replace Element.getElementsByClassName by select as it's deprecated in Prototype 1.6+. Should fix partial refresh.
- UpdateWindowResponse doesn't seem used anymore so make PortalObjectResponseHandler fail if we encounter one to try to see if it's really not used anymore.
- Removed duplicated code in InternalContentProvider (supportedModes and supportedWindowStates were reset when getting the ones for the current media type).
- Clean-ups.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-02-11 13:11:53 UTC (rev 12808)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2009-02-11 18:20:48 UTC (rev 12809)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -29,13 +29,13 @@
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerContext;
import org.jboss.portal.core.controller.ControllerResponse;
-import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
-import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
import org.jboss.portal.core.controller.handler.AjaxResponse;
import org.jboss.portal.core.controller.handler.CommandForward;
import org.jboss.portal.core.controller.handler.HandlerResponse;
import org.jboss.portal.core.controller.handler.ResponseHandler;
import org.jboss.portal.core.controller.handler.ResponseHandlerException;
+import org.jboss.portal.core.controller.portlet.ControllerPageNavigationalState;
+import org.jboss.portal.core.controller.portlet.ControllerPortletControllerContext;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.PortalObject;
import org.jboss.portal.core.model.portal.PortalObjectContainer;
@@ -47,7 +47,6 @@
import org.jboss.portal.core.model.portal.command.response.MarkupResponse;
import org.jboss.portal.core.model.portal.command.response.PortletWindowActionResponse;
import org.jboss.portal.core.model.portal.command.response.UpdatePageResponse;
-import org.jboss.portal.core.model.portal.command.response.UpdateWindowResponse;
import org.jboss.portal.core.model.portal.command.view.ViewPageCommand;
import org.jboss.portal.core.model.portal.content.WindowRendition;
import org.jboss.portal.core.model.portal.navstate.WindowNavigationalState;
@@ -171,23 +170,13 @@
}
}
else if (controllerResponse instanceof UpdatePageResponse)
-// {
-// UpdatePageResponse upr = (UpdatePageResponse)controllerResponse;
-// ViewPageCommand rpc = new ViewPageCommand(upr.getPageId());
-// String url = controllerContext.renderURL(rpc, null, null);
-// UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
-// return new AjaxResponse(dresp);
-// }
-// else if (controllerResponse instanceof UpdateWindowResponse)
{
UpdatePageResponse upw = (UpdatePageResponse)controllerResponse;
// Obtain page and portal
-// final Window window = (Window)portalObjectContainer.getObject(upw.getWindowId());
-// Page page = (Page)window.getParent();
final Page page = (Page)portalObjectContainer.getObject(upw.getPageId());
-
+
//
NavigationalStateContext ctx = (NavigationalStateContext)controllerContext.getAttributeResolver(ControllerCommand.NAVIGATIONAL_STATE_SCOPE);
@@ -198,67 +187,60 @@
boolean fullRefresh = false;
//
-
+
if (ctx.getChanges() == null)
{
fullRefresh = true;
}
else
{
-
- for (Iterator i = ctx.getChanges(); i.hasNext();)
- {
- NavigationalStateChange change = (NavigationalStateChange)i.next();
- // A change that modifies potentially the page structure
- if (!(change instanceof NavigationalStateObjectChange))
+ for (Iterator i = ctx.getChanges(); i.hasNext();)
{
- fullRefresh = true;
- break;
- }
- NavigationalStateObjectChange update = (NavigationalStateObjectChange)change;
-/*
- // A change that modifies potentially the page structure
- if (update.getType() != NavigationalStateObjectChange.UPDATE)
- {
- fullRefresh = true;
- break;
- }
-*/
- // Get the state key
- NavigationalStateKey key = update.getKey();
+ NavigationalStateChange change = (NavigationalStateChange)i.next();
- // We consider only portal object types
- if (key.getType() == WindowNavigationalState.class)
- {
- // Get old window state
- WindowNavigationalState oldNS = (WindowNavigationalState)update.getOldValue();
- WindowState oldWindowState = oldNS != null ? oldNS.getWindowState() : null;
+ // A change that modifies potentially the page structure
+ if (!(change instanceof NavigationalStateObjectChange))
+ {
+ fullRefresh = true;
+ break;
+ }
+ NavigationalStateObjectChange update = (NavigationalStateObjectChange)change;
- // Get new window state
- WindowNavigationalState newNS = (WindowNavigationalState)update.getNewValue();
- WindowState newWindowState = newNS != null ? newNS.getWindowState() : null;
+ // Get the state key
+ NavigationalStateKey key = update.getKey();
- // Check if window state requires a refresh
- if (WindowState.MAXIMIZED.equals(oldWindowState))
+ // We consider only portal object types
+ if (key.getType() == WindowNavigationalState.class)
{
- if (!WindowState.MAXIMIZED.equals(newWindowState))
+ // Get old window state
+ WindowNavigationalState oldNS = (WindowNavigationalState)update.getOldValue();
+ WindowState oldWindowState = oldNS != null ? oldNS.getWindowState() : null;
+
+ // Get new window state
+ WindowNavigationalState newNS = (WindowNavigationalState)update.getNewValue();
+ WindowState newWindowState = newNS != null ? newNS.getWindowState() : null;
+
+ // Check if window state requires a refresh
+ if (WindowState.MAXIMIZED.equals(oldWindowState))
{
+ if (!WindowState.MAXIMIZED.equals(newWindowState))
+ {
+ fullRefresh = true;
+ break;
+ }
+ }
+ else if (WindowState.MAXIMIZED.equals(newWindowState))
+ {
fullRefresh = true;
break;
}
- }
- else if (WindowState.MAXIMIZED.equals(newWindowState))
- {
- fullRefresh = true;
- break;
- }
- // Collect the dirty window id
- dirtyWindowIds.add(key.getId());
+ // Collect the dirty window id
+ dirtyWindowIds.add(key.getId());
+ }
}
}
- }
// Commit changes
ctx.applyChanges();
@@ -315,12 +297,6 @@
{
WindowContext wc = wcf.createWindowContext(refreshedWindow, rendition);
-// WindowContext wc = new WindowContext(
-// _window.getId().toString(PortalObjectPath.LEGACY_BASE64_FORMAT),
-// _window.getProperty(ThemeConstants.PORTAL_PROP_REGION),
-// "0",
-// windowResult);
-
//
res.addWindowContext(wc);
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java 2009-02-11 13:11:53 UTC (rev 12808)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/classic/ClassicResponseHandler.java 2009-02-11 18:20:48 UTC (rev 12809)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -73,9 +73,8 @@
ControllerCommand command,
ControllerResponse commandResponse) throws ResponseHandlerException
{
- for (int i = 0; i < handlers.length; i++)
+ for (ResponseHandler handler : handlers)
{
- ResponseHandler handler = handlers[i];
HandlerResponse handlerResponse = handler.processCommandResponse(controllerContext, command, commandResponse);
if (handlerResponse != null)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2009-02-11 13:11:53 UTC (rev 12808)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/content/InternalContentProvider.java 2009-02-11 18:20:48 UTC (rev 12809)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -195,7 +195,6 @@
{
ControllerResponse cr;
- //
if (e instanceof NoSuchPortletException)
{
cr = new UnavailableResourceResponse(((NoSuchPortletException)e).getPortletId(), false);
@@ -206,19 +205,11 @@
cr = new org.jboss.portal.core.controller.command.response.ErrorResponse(e, false);
}
- //
return new WindowRendition(windowProps, WindowState.NORMAL, Mode.VIEW, null, null, cr);
}
- //
PortletWindowNavigationalState windowNS = rendererContext.getPortletNavigationalState();
- if (windowNS == null)
- {
-
- }
-
- //
Mode mode = windowNS.getMode();
WindowState windowState = windowNS.getWindowState();
@@ -256,23 +247,11 @@
Portlet portlet = instance.getPortlet();
CapabilitiesInfo capabilitiesInfo = portlet.getInfo().getCapabilities();
- // Add window states for any media type
- Set<WindowStateInfo> windowStatesInfo = capabilitiesInfo.getAllWindowStates();
- supportedWindowStates = new ArrayList<WindowState>(windowStatesInfo.size());
- for (WindowStateInfo windowStateInfo : windowStatesInfo)
- {
- WindowState tmp = windowStateInfo.getWindowState();
- if (portal.getSupportedWindowStates().contains(tmp))
- {
- supportedWindowStates.add(tmp);
- }
- }
-
// Get current Media Type
MediaType mediaType = invocation.getContext().getMarkupInfo().getMediaType();
// Add window states for the current media type
- windowStatesInfo = capabilitiesInfo.getWindowStates(mediaType);
+ Set<WindowStateInfo> windowStatesInfo = capabilitiesInfo.getWindowStates(mediaType);
supportedWindowStates = new ArrayList<WindowState>(windowStatesInfo.size());
for (WindowStateInfo windowStateInfo : windowStatesInfo)
{
@@ -283,29 +262,8 @@
}
}
- // fail fast if we are requesting a window state that is not supported by this portlet
- // todo: this causes an issue with WSRP. See: JBPORTAL-2208
- /*if (!supportedWindowStates.contains(windowState))
- {
- String windowStateName = windowState.toString();
- throw new WindowStateException(windowStateName + " is not supported by portlet " + getPortletName(portlet),
- new javax.portlet.WindowState(windowStateName));
- }*/
-
- // Add modes for any media type
- Set<ModeInfo> modesInfo = capabilitiesInfo.getAllModes();
- supportedModes = new ArrayList<Mode>(modesInfo.size());
- for (ModeInfo modeInfo : modesInfo)
- {
- Mode tmp = modeInfo.getMode();
- if (portal.getSupportedModes().contains(tmp))
- {
- supportedModes.add(tmp);
- }
- }
-
// Add modes specific to the current media type
- modesInfo = capabilitiesInfo.getModes(mediaType);
+ Set<ModeInfo> modesInfo = capabilitiesInfo.getModes(mediaType);
supportedModes = new ArrayList<Mode>(modesInfo.size());
for (ModeInfo modeInfo : modesInfo)
{
@@ -316,15 +274,6 @@
}
}
- // fail fast if we are requesting a window state that is not supported by this portlet
- // todo: this causes an issue with WSRP. See: JBPORTAL-2208
- /*if (!supportedModes.contains(mode))
- {
- String modeName = mode.toString();
- throw new PortletModeException(modeName + " is not supported by portlet " + getPortletName(portlet),
- new javax.portlet.PortletMode(modeName));
- }*/
-
// Remove edit mode if the user is not logged it
if (rendererContext.getUser() == null)
{
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-02-11 13:11:53 UTC (rev 12808)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/model/portal/PortalObjectResponseHandler.java 2009-02-11 18:20:48 UTC (rev 12809)
@@ -1,6 +1,6 @@
/******************************************************************************
* JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * Copyright 2009, Red Hat Middleware, LLC, and individual *
* contributors as indicated by the @authors tag. See the *
* copyright.txt in the distribution for a full listing of *
* individual contributors. *
@@ -22,6 +22,7 @@
******************************************************************************/
package org.jboss.portal.core.model.portal;
+import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.core.controller.ControllerCommand;
import org.jboss.portal.core.controller.ControllerContext;
@@ -42,12 +43,8 @@
import org.jboss.portal.web.ServletContextDispatcher;
import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletRequestWrapper;
import javax.servlet.http.HttpServletRequestWrapper;
-
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Locale;
@@ -62,13 +59,15 @@
{
if (controllerResponse instanceof UpdateWindowResponse)
{
- UpdateWindowResponse uwmr = (UpdateWindowResponse)controllerResponse;
- PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
- PortalObject window = portalObjectContainer.getObject(uwmr.getWindowId());
- Page page = (Page)window.getParent();
+ /* UpdateWindowResponse uwmr = (UpdateWindowResponse)controllerResponse;
+ PortalObjectContainer portalObjectContainer = controllerContext.getController().getPortalObjectContainer();
+ PortalObject window = portalObjectContainer.getObject(uwmr.getWindowId());
+ Page page = (Page)window.getParent();
- // We can do that safely as we know that only this class is responsible for evaluating UpdatePageResponse objects
- controllerResponse = new UpdatePageResponse(page.getId());
+ // We can do that safely as we know that only this class is responsible for evaluating UpdatePageResponse objects
+ controllerResponse = new UpdatePageResponse(page.getId());*/
+
+ throw new NotYetImplemented("UpdateWindowResponse doesn't seem supported anymore!");
}
//
@@ -89,7 +88,8 @@
{
public void sendResponse(ServerInvocationContext ctx) throws IOException, ServletException
{
- HttpServletRequestWrapper request = new HttpServletRequestWrapper(invocation.getServerContext().getClientRequest()) {
+ HttpServletRequestWrapper request = new HttpServletRequestWrapper(invocation.getServerContext().getClientRequest())
+ {
@Override
public Locale getLocale()
{
@@ -103,7 +103,7 @@
}
};
- ServletContextDispatcher dispatcher = new ServletContextDispatcher(request, invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainer());
+ ServletContextDispatcher dispatcher = new ServletContextDispatcher(request, invocation.getServerContext().getClientResponse(), invocation.getRequest().getServer().getServletContainer());
MarkupInfo markupInfo = (MarkupInfo)invocation.getResponse().getContentInfo();
rendition.render(markupInfo, dispatcher);
}
Modified: branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js
===================================================================
--- branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-02-11 13:11:53 UTC (rev 12808)
+++ branches/JBoss_Portal_Branch_2_7/theme/src/bin/portal-ajax-war/dyna/dyna.js 2009-02-11 18:20:48 UTC (rev 12809)
@@ -225,13 +225,13 @@
*/
function copyInnerHTML(srcContainer, dstContainer, className)
{
- var srcs = Element.getElementsByClassName(srcContainer, className);
+ var srcs = srcContainer.select("." + className);
if (srcs.length == 1)
{
var src = srcs[0];
//
- var dsts = Element.getElementsByClassName(dstContainer, className)
+ var dsts = dstContainer.select("." + className);
if (dsts.length == 1)
{
var dst = dsts[0];
17 years, 2 months
JBoss Portal SVN: r12808 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-11 08:11:53 -0500 (Wed, 11 Feb 2009)
New Revision: 12808
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
Log:
stoping selenium server
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 13:08:42 UTC (rev 12807)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 13:11:53 UTC (rev 12808)
@@ -156,6 +156,7 @@
<jvmarg value="-ea" />
</testng>
+ <antcall target="cleanup" />
</target>
17 years, 2 months
JBoss Portal SVN: r12807 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-11 08:08:42 -0500 (Wed, 11 Feb 2009)
New Revision: 12807
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
Log:
passing properties
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 11:30:27 UTC (rev 12806)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 13:08:42 UTC (rev 12807)
@@ -82,7 +82,7 @@
<arg value="-userExtensions" />
<arg value="${selsrv.dir}/user-extensions.js" />
</java>
- <sleep seconds="20"/>
+ <sleep seconds="20" />
</target>
<target name="stop-src">
@@ -130,6 +130,9 @@
includes="org/jboss/portal/test/selenium/*Test.class" / -->
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
+ <sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
<jvmarg value="-ea" />
</testng>
@@ -148,6 +151,8 @@
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
<sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
<jvmarg value="-ea" />
</testng>
@@ -165,6 +170,8 @@
<sysproperty key="browser" value="${browser}" />
<sysproperty key="screenshot" value="${screenshot}" />
<sysproperty key="workspace" value="${workspace}" />
+ <sysproperty key="userCount" value="${userCount}" />
+ <sysproperty key="html-src" value="${html-src}" />
<jvmarg value="-ea" />
17 years, 2 months
JBoss Portal SVN: r12806 - branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-11 06:30:27 -0500 (Wed, 11 Feb 2009)
New Revision: 12806
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
Log:
listerner for screenshots added for single testing
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 11:27:56 UTC (rev 12805)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 11:30:27 UTC (rev 12806)
@@ -142,7 +142,7 @@
<echo message="Runing TestNG" />
<mkdir dir="test-output" />
- <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" suitename="SeleniumSingleTest" verbose="2">
+ <testng classpathref="test.cp" sourcedir="${test.src.dir}" outputdir="${testng.output.dir}" listeners="org.jboss.portal.test.selenium.JBossSeleniumTestListener" suitename="SeleniumSingleTest" verbose="2">
<classfileset dir="${test.build.dir}" includes="${testname}" />
<sysproperty key="browser" value="${browser}" />
17 years, 2 months
JBoss Portal SVN: r12805 - in branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests: lib and 1 other directory.
by portal-commits@lists.jboss.org
Author: vrockai
Date: 2009-02-11 06:27:56 -0500 (Wed, 11 Feb 2009)
New Revision: 12805
Added:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/lib/jboss-test.jar
Modified:
branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
Log:
jboss-test.jar added, sleep after runing selenium server
Modified: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-10 12:45:05 UTC (rev 12804)
+++ branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/build.xml 2009-02-11 11:27:56 UTC (rev 12805)
@@ -22,7 +22,7 @@
<property name="node0" value="localhost" />
<property name="jboss.test.home" value="${env.JBOSS_TEST_HOME}" />
<property name="jboss.home" value="${env.JBOSS_HOME}" />
- <property name="jboss.test.jar" value="../../tools/lib/jboss-test.jar" />
+ <property name="jboss.test.jar" value="lib/jboss-test.jar" />
<property name="jboss.portal.dir" value="${env.JBOSS_UNZIPED_DIR}" />
<property name="portal_archive" value="${env.JBOSS_ARCHIVE}" />
<property name="portal.instance" value="default" />
@@ -82,6 +82,7 @@
<arg value="-userExtensions" />
<arg value="${selsrv.dir}/user-extensions.js" />
</java>
+ <sleep seconds="20"/>
</target>
<target name="stop-src">
Added: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/lib/jboss-test.jar
===================================================================
(Binary files differ)
Property changes on: branches/JBoss_Portal_Branch_2_7/testsuite/ui-tests/lib/jboss-test.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
17 years, 2 months