You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2013/02/15 22:11:34 UTC
svn commit: r1446773 - in
/archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin:
./ src/it/redback-model/ src/it/redback-model/src/
src/it/redback-model/src/main/ src/it/redback-model/src/main/mdo/
Author: olamy
Date: Fri Feb 15 21:11:34 2013
New Revision: 1446773
URL: http://svn.apache.org/r1446773
Log:
add it test
Added:
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml (with props)
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo (with props)
Modified:
archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/pom.xml
Modified: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/pom.xml?rev=1446773&r1=1446772&r2=1446773&view=diff
==============================================================================
--- archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/pom.xml (original)
+++ archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/pom.xml Fri Feb 15 21:11:34 2013
@@ -20,8 +20,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
- <artifactId>modello-plugins</artifactId>
<groupId>org.apache.archiva.redback.components.modello</groupId>
+ <artifactId>modello-plugins</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
Added: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml?rev=1446773&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml (added)
+++ archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml Fri Feb 15 21:11:34 2013
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.archiva.redback.components.modello.jpox.plugin</groupId>
+
+ <artifactId>redback-rbac-jdo-test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.modello</groupId>
+ <artifactId>modello-maven-plugin</artifactId>
+ <version>1.6</version>
+ <configuration>
+ <version>1.0.1</version>
+ <packageWithVersion>false</packageWithVersion>
+ <models>
+ <model>src/main/mdo/rbac-jdo.mdo</model>
+ </models>
+ </configuration>
+ <executions>
+ <execution>
+ <id>modello-java</id>
+ <goals>
+ <goal>java</goal>
+ <goal>stax-reader</goal>
+ <goal>stax-writer</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.archiva.redback.components.modello</groupId>
+ <artifactId>jpox-modello-maven-plugin</artifactId>
+ <version>@pom.version@</version>
+ <configuration>
+ <version>1.0.1</version>
+ <packageWithVersion>false</packageWithVersion>
+ <models>
+ <model>src/main/mdo/rbac-jdo.mdo</model>
+ </models>
+ </configuration>
+ <executions>
+ <execution>
+ <id>modello-jpox</id>
+ <goals>
+ <goal>jpox-metadata-class</goal>
+ <goal>jpox-jdo-mapping</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
\ No newline at end of file
Propchange: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo?rev=1446773&view=auto
==============================================================================
--- archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo (added)
+++ archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo Fri Feb 15 21:11:34 2013
@@ -0,0 +1,324 @@
+<?xml version="1.0"?>
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+<model jpox.mapping-in-package="true"
+ jpox.table-prefix="SECURITY_">
+ <!-- TODO: there is no reason this model is JDO specific. Shouldn't it be the basis for the various providers? It would dramatically reduce the code in -memory, for example -->
+ <id>rbac-jdo</id>
+ <name>RbacJdoModel</name>
+ <version>1.0.1</version>
+ <defaults>
+ <default>
+ <key>package</key>
+ <value>org.apache.archiva.redback.components.modello.jpox.plugin</value>
+ </default>
+ </defaults>
+ <classes>
+ <class rootElement="true"
+ jpox.stashable="false">
+ <name>RbacDatabase</name>
+ <version>1.0.1+</version>
+ <fields>
+ <field jpox.column="RBAC_ROLES">
+ <name>roles</name>
+ <version>1.0.1+</version>
+ <association>
+ <type>JdoRole</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>permissions</name>
+ <version>1.0.1+</version>
+ <association>
+ <type>JdoPermission</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>operations</name>
+ <version>1.0.1+</version>
+ <association>
+ <type>JdoOperation</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>resources</name>
+ <version>1.0.1+</version>
+ <association>
+ <type>JdoResource</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ <field>
+ <name>userAssignments</name>
+ <version>1.0.1+</version>
+ <association>
+ <type>JdoUserAssignment</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class jpox.stashable="true"
+ jpox.table="ROLES"
+ jpox.not-persisted-fields="modelEncoding">
+ <name>JdoRole</name>
+ <version>1.0.0+</version>
+ <fields>
+ <field jpox.primary-key="true" jpox.value-strategy="off">
+ <name>name</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>assignable</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this role is available to be assigned to a user
+ </description>
+ </field>
+ <field>
+ <name>permanent</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this object is permanent.
+ </description>
+ </field>
+ <field jpox.persistence-modifier="persistent"
+ jpox.fetch-groups="role-child-detail"
+ jpox.join-table="ROLE_CHILDROLE_MAP">
+ <name>childRoleNames</name>
+ <version>1.0.0+</version>
+ <association stash.part="true"
+ jpox.join="true"
+ java.init="field"
+ jpox.dependent="false"
+ java.generate-break="false"
+ java.generate-create="false">
+ <type>String</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ <description>
+ roles that will inherit the permissions of this role
+ </description>
+ </field>
+ <field jpox.fetch-groups="role-child-detail"
+ jpox.join-table="ROLE_PERMISSION_MAP">
+ <name>permissions</name>
+ <version>1.0.0+</version>
+ <association stash.part="true"
+ xml.reference="true"
+ jpox.join="true"
+ jpox.dependent="false"
+ java.init="field"
+ java.generate-break="false"
+ java.generate-create="false">
+ <type>JdoPermission</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class jpox.stashable="true"
+ jpox.table="PERMISSIONS"
+ jpox.not-persisted-fields="modelEncoding">
+ <name>JdoPermission</name>
+ <version>1.0.0+</version>
+
+ <fields>
+ <field jpox.primary-key="true" jpox.value-strategy="off">
+ <name>name</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>permanent</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this object is permanent.
+ </description>
+ </field>
+ <field jpox.indexed="true"
+ jpox.persistence-modifier="persistent"
+ jpox.column="RBAC_OPERATION">
+ <name>operation</name>
+ <version>1.0.0+</version>
+ <association stash.part="true"
+ xml.reference="true"
+ jpox.dependent="false">
+ <type>JdoOperation</type>
+ <multiplicity>1</multiplicity>
+ </association>
+ </field>
+ <field jpox.indexed="true"
+ jpox.persistence-modifier="persistent"
+ jpox.column="RBAC_RESOURCE">
+ <name>resource</name>
+ <version>1.0.0+</version>
+ <association stash.part="true"
+ xml.reference="true"
+ jpox.dependent="false">
+ <type>JdoResource</type>
+ <multiplicity>1</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+
+ <class jpox.stashable="true"
+ jpox.table="OPERATIONS"
+ jpox.not-persisted-fields="modelEncoding">
+ <name>JdoOperation</name>
+ <version>1.0.0+</version>
+
+ <fields>
+ <field jpox.primary-key="true" jpox.value-strategy="off">
+ <name>name</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>description</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ </field>
+ <field>
+ <name>permanent</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this object is permanent.
+ </description>
+ </field>
+ <field>
+ <name>resourceRequired</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if the resource is required for authorization to be granted
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class jpox.stashable="true"
+ jpox.table="RESOURCES"
+ jpox.not-persisted-fields="modelEncoding">
+ <name>JdoResource</name>
+ <version>1.0.0+</version>
+ <description>
+ In RBAC terms, this is the entity which an operation is associated with that which permissions are based on.
+ </description>
+
+ <fields>
+ <field jpox.primary-key="true" jpox.value-strategy="off">
+ <name>identifier</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ <description>
+ The string identifier for a resource.
+ </description>
+ <identifier>true</identifier>
+ </field>
+ <field>
+ <name>pattern</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if the identifer is a pattern that is to be evaluated, for example x.* could match x.a or x.b and x.**
+ could match x.foo
+ </description>
+ </field>
+ <field>
+ <name>permanent</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this object is permanent.
+ </description>
+ </field>
+ </fields>
+ </class>
+
+ <class jpox.stashable="true"
+ jpox.table="USER_ASSIGNMENTS"
+ jpox.not-persisted-fields="modelEncoding">
+ <name>JdoUserAssignment</name>
+ <description>binding of a principal to a role</description>
+
+ <fields>
+ <field jpox.primary-key="true" jpox.value-strategy="off">
+ <name>principal</name>
+ <version>1.0.0+</version>
+ <type>String</type>
+ <identifier>true</identifier>
+ </field>
+ <field jpox.column="LAST_UPDATED">
+ <name>timestamp</name>
+ <version>1.0.0+</version>
+ <type>Date</type>
+ </field>
+ <field>
+ <name>permanent</name>
+ <version>1.0.0+</version>
+ <type>boolean</type>
+ <description>
+ true if this object is permanent.
+ </description>
+ </field>
+ <field java.adder="false"
+ jpox.persistence-modifier="persistent"
+ jpox.indexed="false"
+ jpox.join-table="USERASSIGNMENT_ROLENAMES">
+ <name>roleNames</name>
+ <version>1.0.0+</version>
+ <association stash.part="true"
+ jpox.join="true"
+ java.init="field"
+ java.generate-break="false"
+ java.generate-create="false">
+ <type>String</type>
+ <multiplicity>*</multiplicity>
+ </association>
+ </field>
+ </fields>
+ </class>
+ </classes>
+</model>
Propchange: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: archiva/redback/redback-components/trunk/modello-plugins/jpox-modello-maven-plugin/src/it/redback-model/src/main/mdo/rbac-jdo.mdo
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision