deltaspike-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Oliveira <br...@abstractj.org>
Subject Re: [16/20] git commit: added missing files
Date Tue, 24 Jul 2012 10:58:03 GMT
Morning guys. 

When will these changes take effect in 0.3 or 0.4 release? 

-- 
"The measure of a man is what he does with power" - Plato
-
@abstractj
-
Volenti Nihil Difficile



On Tuesday, July 24, 2012 at 6:49 AM, Gerhard Petracek wrote:

> hi shane,
> 
> not ordered by priority:
> 
> #1
> the java-se example-module should not contain web-app-examples -> please
> move this example
> 
> #2
> please create jira tickets for new or changed parts + use the issue
> number/s in your commit-message.
> 
> #3
> please re-visit your commit messages, before you push commits.
> 
> #4
> every file needs a license header!
> 
> #5
> please change your ide settings to avoid tabs (see [1])
> 
> regards,
> gerhard
> 
> [1] http://s.apache.org/I2y
> 
> 
> 
> 2012/7/24 <sbryzak@apache.org (mailto:sbryzak@apache.org)>
> 
> > added missing files
> > 
> > 
> > Project: http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/repo
> > Commit:
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/commit/4bc36662
> > Tree:
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/tree/4bc36662
> > Diff:
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/diff/4bc36662
> > 
> > Branch: refs/heads/master
> > Commit: 4bc36662b9ad65b7d10f8ea150ea3f4bb0e73171
> > Parents: 6f27b78
> > Author: Shane Bryzak <sbryzak@gmail.com (mailto:sbryzak@gmail.com)>
> > Authored: Wed May 30 19:34:38 2012 +1000
> > Committer: Shane Bryzak <sbryzak@gmail.com (mailto:sbryzak@gmail.com)>
> > Committed: Tue Jul 24 10:05:06 2012 +1000
> > 
> > ----------------------------------------------------------------------
> > deltaspike/examples/security-console/pom.xml | 111 ++++++
> > .../securityconsole/BasicAuthenticator.java | 23 ++
> > .../src/main/resources/META-INF/beans.xml | 23 ++
> > .../main/webapp/WEB-INF/templates/default.xhtml | 38 ++
> > .../src/main/webapp/WEB-INF/web.xml (http://web.xml) | 30 ++
> > .../security-console/src/main/webapp/home.xhtml | 39 ++
> > .../security-console/src/main/webapp/index.html | 5 +
> > .../security-console/src/main/webapp/menu.xhtml | 27 ++
> > .../src/main/webapp/style/default.css | 61 ++++
> > .../security/api/permission/Permission.java | 54 +++
> > .../security/api/permission/PermissionManager.java | 29 ++
> > .../permission/annotations/CheckPermissions.java | 39 ++
> > .../permission/annotations/RequiresPermission.java | 34 ++
> > .../spi/permission/PermissionResolver.java | 43 +++
> > .../security/spi/permission/PermissionStore.java | 51 +++
> > .../deltaspike/security/impl/DefaultIdentity.java | 12 +
> > .../security/impl/idm/AbstractIdentityType.java | 81 +++++
> > .../security/impl/idm/DefaultIdentityManager.java | 272 +++++++++++++++
> > .../security/impl/idm/JPAIdentityStore.java | 238 +++++++++++++
> > .../security/impl/idm/LDAPIdentityStore.java | 238 +++++++++++++
> > .../deltaspike/security/impl/idm/SimpleGroup.java | 54 +++
> > .../deltaspike/security/impl/idm/SimpleRole.java | 40 +++
> > .../deltaspike/security/impl/idm/SimpleUser.java | 85 +++++
> > .../security/impl/permission/PermissionMapper.java | 78 ++++
> > .../permission/PersistentPermissionResolver.java | 45 +++
> > 25 files changed, 1750 insertions(+), 0 deletions(-)
> > ----------------------------------------------------------------------
> > 
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/pom.xml
> > ----------------------------------------------------------------------
> > diff --git a/deltaspike/examples/security-console/pom.xml
> > b/deltaspike/examples/security-console/pom.xml
> > new file mode 100644
> > index 0000000..f96daf7
> > --- /dev/null
> > +++ b/deltaspike/examples/security-console/pom.xml
> > @@ -0,0 +1,111 @@
> > +<?xml version="1.0" encoding="UTF-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/maven-v4_0_0.xsd
> > ">
> > +<!--
> > + 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.
> > +-->
> > + <modelVersion>4.0.0</modelVersion>
> > +
> > + <parent>
> > + <groupId>org.apache.deltaspike.examples</groupId>
> > + <artifactId>jse-examples-project</artifactId>
> > + <version>0.3-incubating-SNAPSHOT</version>
> > + </parent>
> > +
> > + <groupId>org.apache.deltaspike.examples</groupId>
> > + <artifactId>security-console</artifactId>
> > +
> > + <name>Apache DeltaSpike Security Console Example</name>
> > +
> > + <packaging>war</packaging>
> > +
> > + <dependencies>
> > +
> > + <!-- DeltaSpike modules -->
> > + <dependency>
> > + <groupId>org.apache.deltaspike.core</groupId>
> > + <artifactId>deltaspike-core-api</artifactId>
> > + <scope>compile</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.deltaspike.core</groupId>
> > + <artifactId>deltaspike-core-impl</artifactId>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.deltaspike.modules</groupId>
> > + <artifactId>deltaspike-security-module-api</artifactId>
> > + <scope>compile</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.deltaspike.modules</groupId>
> > + <artifactId>deltaspike-security-module-impl</artifactId>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + </dependencies>
> > +
> > + <profiles>
> > + <profile>
> > + <id>OWB</id>
> > + <dependencies>
> > + <dependency>
> > + <groupId>org.apache.openwebbeans</groupId>
> > + <artifactId>openwebbeans-impl</artifactId>
> > + <scope>compile</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.openwebbeans</groupId>
> > + <artifactId>openwebbeans-spi</artifactId>
> > + <scope>compile</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.apache.deltaspike.cdictrl</groupId>
> > + <artifactId>deltaspike-cdictrl-owb</artifactId>
> > + <scope>runtime</scope>
> > + </dependency>
> > + </dependencies>
> > + </profile>
> > + <profile>
> > + <id>Weld</id>
> > + <dependencies>
> > + <dependency>
> > + <groupId>org.apache.deltaspike.cdictrl</groupId>
> > + <artifactId>deltaspike-cdictrl-weld</artifactId>
> > + <scope>runtime</scope>
> > + </dependency>
> > +
> > + <dependency>
> > + <groupId>org.jboss.weld.se (http://org.jboss.weld.se)</groupId>
> > + <artifactId>weld-se</artifactId>
> > + <version>${weld.version}</version>
> > + <scope>runtime</scope>
> > + </dependency>
> > + </dependencies>
> > + </profile>
> > + </profiles>
> > +
> > + <build>
> > + <finalName>security-console</finalName>
> > + </build>
> > +</project>
> > +
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/java/org/apache/deltaspike/example/securityconsole/BasicAuthenticator.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/java/org/apache/deltaspike/example/securityconsole/BasicAuthenticator.java
> > b/deltaspike/examples/security-console/src/main/java/org/apache/deltaspike/example/securityconsole/BasicAuthenticator.java
> > new file mode 100644
> > index 0000000..e58d319
> > --- /dev/null
> > +++
> > b/deltaspike/examples/security-console/src/main/java/org/apache/deltaspike/example/securityconsole/BasicAuthenticator.java
> > @@ -0,0 +1,23 @@
> > +package org.apache.deltaspike.example.securityconsole;
> > +
> > +import javax.inject.Inject;
> > +
> > +import org.apache.deltaspike.security.api.User;
> > +import org.apache.deltaspike.security.api.credential.LoginCredential;
> > +import
> > org.apache.deltaspike.security.spi.authentication.BaseAuthenticator;
> > +
> > +public class BasicAuthenticator extends BaseAuthenticator
> > +{
> > + @Inject
> > + private LoginCredential loginCredential;
> > +
> > + public void authenticate()
> > + {
> > + if ("shane".equals(loginCredential.getUserId()) &&
> > +
> > "password".equals(loginCredential.getCredential().getValue()))
> > + {
> > + setUser(new User("shane"));
> > + setStatus(AuthenticationStatus.SUCCESS);
> > + }
> > + }
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/resources/META-INF/beans.xml
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/resources/META-INF/beans.xml
> > b/deltaspike/examples/security-console/src/main/resources/META-INF/beans.xml
> > new file mode 100644
> > index 0000000..4070730
> > --- /dev/null
> > +++
> > b/deltaspike/examples/security-console/src/main/resources/META-INF/beans.xml
> > @@ -0,0 +1,23 @@
> > +<?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.
> > +-->
> > +<beans xmlns="http://java.sun.com/xml/ns/javaee"
> > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
> > +</beans>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/WEB-INF/templates/default.xhtml
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/WEB-INF/templates/default.xhtml
> > b/deltaspike/examples/security-console/src/main/webapp/WEB-INF/templates/default.xhtml
> > new file mode 100644
> > index 0000000..1010f7a
> > --- /dev/null
> > +++
> > b/deltaspike/examples/security-console/src/main/webapp/WEB-INF/templates/default.xhtml
> > @@ -0,0 +1,38 @@
> > +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> > + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > +<html xmlns="http://www.w3.org/1999/xhtml"
> > + xmlns:h="http://java.sun.com/jsf/html"
> > + xmlns:ui="http://java.sun.com/jsf/facelets">
> > +<h:head>
> > + <title>DeltaSpike Example - Security Console</title>
> > + <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
> > + <link rel="stylesheet" href="style/default.css" type="text/css"
> > media="screen"/>
> > +</h:head>
> > +<h:body>
> > + <div id="container">
> > + <div id="header">
> > + <div id="title">
> > + Security Console
> > + </div>
> > +
> > + <div id="headerMenu">
> > + <h:form>
> > + <ui:fragment rendered="#{identity.loggedIn}">
> > + Welcome, #{identity.user.id}!<br/>
> > + <a href="changepassword.jsf">Change
> > password</a><span> | </span>
> > + <h:commandLink value="Log out"
> > action="#{identity.logout}"/>
> > + </ui:fragment>
> > + </h:form>
> > + </div>
> > + </div>
> > +
> > + <div id="sidebar">
> > + <ui:insert name="sidebar"/>
> > + </div>
> > +
> > + <div id="content">
> > + <ui:insert name="content"/>
> > + </div>
> > + </div>
> > +</h:body>
> > +</html>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/WEB-INF/web.xml
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/WEB-INF/web.xml (http://web.xml)
> > b/deltaspike/examples/security-console/src/main/webapp/WEB-INF/web.xml (http://web.xml)
> > new file mode 100644
> > index 0000000..11f6635
> > --- /dev/null
> > +++ b/deltaspike/examples/security-console/src/main/webapp/WEB-INF/web.xml (http://web.xml)
> > @@ -0,0 +1,30 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<web-app version="3.0"
> > + xmlns="http://java.sun.com/xml/ns/javaee"
> > + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > + xsi:schemaLocation="
> > + http://java.sun.com/xml/ns/javaee
> > + http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
> > +
> > + <!-- Activate the JSF 2.0 servlet -->
> > + <!-- The JSF servlet declaration and mapping are not required for
> > GlassFish V3 -->
> > + <servlet>
> > + <servlet-name>Faces Servlet</servlet-name>
> > + <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
> > + <load-on-startup>1</load-on-startup>
> > + </servlet>
> > +
> > + <!-- Tell the context which URLs to process as facelets. -->
> > + <servlet-mapping>
> > + <servlet-name>Faces Servlet</servlet-name>
> > + <url-pattern>*.jsf</url-pattern>
> > + </servlet-mapping>
> > +
> > + <!-- This is an optional parameter, but it makes troubleshooting
> > errors much easier -->
> > + <!-- You are advised to delete this context parameter before a
> > production deployment -->
> > + <context-param>
> > + <param-name>facelets.DEVELOPMENT</param-name>
> > + <param-value>true</param-value>
> > + </context-param>
> > +
> > +</web-app>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/home.xhtml
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/home.xhtml
> > b/deltaspike/examples/security-console/src/main/webapp/home.xhtml
> > new file mode 100644
> > index 0000000..c8ae064
> > --- /dev/null
> > +++ b/deltaspike/examples/security-console/src/main/webapp/home.xhtml
> > @@ -0,0 +1,39 @@
> > +<?xml version="1.0" encoding="UTF-8"?>
> > +<ui:composition xmlns="http://www.w3.org/1999/xhtml"
> > + xmlns:ui="http://java.sun.com/jsf/facelets"
> > + xmlns:f="http://java.sun.com/jsf/core"
> > + xmlns:h="http://java.sun.com/jsf/html"
> > + template="/WEB-INF/templates/default.xhtml">
> > +
> > + <ui:define name="sidebar">
> > + <ui:include src="menu.xhtml"/>
> > + </ui:define>
> > +
> > + <ui:define name="content">
> > + <p>This example demonstrates DeltaSpike's security features.</p>
> > +
> > + <h:form id="loginForm" rendered="#{not identity.loggedIn}">
> > + <h:messages id="messages" globalOnly="true"/>
> > +
> > + <div class="loginRow">
> > + <h:outputLabel for="name" value="Username"
> > styleClass="loginLabel"/>
> > + <h:inputText id="name"
> > value="#{loginCredentials.userId}"/>
> > + </div>
> > +
> > + <div class="loginRow">
> > + <h:outputLabel for="password" value="Password"
> > styleClass="loginLabel"/>
> > + <h:inputSecret id="password"
> > value="#{loginCredentials.password}" redisplay="true"/>
> > + </div>
> > +
> > + <div class="buttons">
> > + <h:commandButton id="login" value="LOGIN"
> > action="#{identity.login}" styleClass="loginButton"/>
> > + </div>
> > +
> > + Tip: you can login with a username/password of demo/demo.
> > +
> > + </h:form>
> > +
> > + <br style="clear:both"/>
> > +
> > + </ui:define>
> > +</ui:composition>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/index.html
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/index.html
> > b/deltaspike/examples/security-console/src/main/webapp/index.html
> > new file mode 100644
> > index 0000000..c54885e
> > --- /dev/null
> > +++ b/deltaspike/examples/security-console/src/main/webapp/index.html
> > @@ -0,0 +1,5 @@
> > +<html>
> > +<head>
> > + <meta http-equiv="Refresh" content="0; URL=home.jsf">
> > +</head>
> > +</html>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/menu.xhtml
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/menu.xhtml
> > b/deltaspike/examples/security-console/src/main/webapp/menu.xhtml
> > new file mode 100644
> > index 0000000..daaa7ec
> > --- /dev/null
> > +++ b/deltaspike/examples/security-console/src/main/webapp/menu.xhtml
> > @@ -0,0 +1,27 @@
> > +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > +<html xmlns="http://www.w3.org/1999/xhtml"
> > + xmlns:h="http://java.sun.com/jsf/html"
> > + xmlns:f="http://java.sun.com/jsf/core"
> > + xmlns:ui="http://java.sun.com/jsf/facelets">
> > +
> > +<ui:composition>
> > +
> > + <div class="menuitem">
> > + <a href="home.jsf">Home</a>
> > + </div>
> > +
> > + <div class="menuitem">
> > + <a href="manageusers.jsf">Manage users</a>
> > + </div>
> > +
> > + <div class="menuitem">
> > + <a href="managegroups.jsf">Manage groups</a>
> > + </div>
> > +
> > + <div class="menuitem">
> > + <a href="manageroletypes.jsf">Manage role types</a>
> > + </div>
> > +
> > +</ui:composition>
> > +
> > +</html>
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/examples/security-console/src/main/webapp/style/default.css
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/examples/security-console/src/main/webapp/style/default.css
> > b/deltaspike/examples/security-console/src/main/webapp/style/default.css
> > new file mode 100644
> > index 0000000..653c97d
> > --- /dev/null
> > +++
> > b/deltaspike/examples/security-console/src/main/webapp/style/default.css
> > @@ -0,0 +1,61 @@
> > +body {
> > + margin: 0;
> > + padding: 0;
> > + background-color: #5c6066;
> > + font-family: Verdana, sans-serif;
> > + font-size: 0.9em;
> > +}
> > +
> > +div#header {
> > + height: 80px;
> > + background-color: #eeeeee;
> > +}
> > +
> > +div#headerMenu {
> > + float: right;
> > +}
> > +
> > +div#title {
> > + padding-top: 22px;
> > + font-size: 22px;
> > + font-weight: bold;
> > + margin-left: 180px;
> > +}
> > +
> > +div#container {
> > + margin: 0px auto;
> > + padding: 2px 2px 2px 4px;
> > + border: 1px solid #666666;
> > + width: 865px;
> > + background: #FFFFFF;
> > +}
> > +
> > +div#sidebar {
> > + font-size: 0.9em;
> > + width: 160px;
> > + float: left;
> > + border: 1px solid #666666;
> > + background: #EAECEE;
> > + padding: 4px 4px 24px 4px;
> > + margin-top: 8px;
> > +}
> > +
> > +div#content {
> > + padding: 4px 4px 4px 4px;
> > + margin-left: 180px;
> > +}
> > +
> > +div.menuitem a {
> > + font-weight: bold;
> > + text-decoration: none;
> > +}
> > +
> > +input.newuser {
> > + background: url(btn_newuser.png) top left no-repeat;
> > + height: 39px;
> > + width: 113px;
> > + margin: 4px 4px 4px 4px;
> > + border: 0px;
> > + cursor: pointer;
> > +}
> > +
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/Permission.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/Permission.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/Permission.java
> > new file mode 100644
> > index 0000000..4221eed
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/Permission.java
> > @@ -0,0 +1,54 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.api.permission;
> > +
> > +import org.apache.deltaspike.security.api.idm.IdentityType;
> > +
> > +/**
> > + * Represents a specific permission grant for a domain object
> > + *
> > + */
> > +public class Permission
> > +{
> > + private Object resource;
> > + private IdentityType recipient;
> > + private String permission;
> > +
> > + public Permission(Object resource, IdentityType recipient, String
> > permission)
> > + {
> > + this.resource = resource;
> > + this.recipient = recipient;
> > + this.permission = permission;
> > + }
> > +
> > + public Object getResource()
> > + {
> > + return resource;
> > + }
> > +
> > + public IdentityType getRecipient()
> > + {
> > + return recipient;
> > + }
> > +
> > + public String getPermission()
> > + {
> > + return permission;
> > + }
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/PermissionManager.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/PermissionManager.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/PermissionManager.java
> > new file mode 100644
> > index 0000000..e1e87ae
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/PermissionManager.java
> > @@ -0,0 +1,29 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.api.permission;
> > +
> > +/**
> > + * Manages user permissions.
> > + *
> > + */
> > +public interface PermissionManager
> > +{
> > +
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/CheckPermissions.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/CheckPermissions.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/CheckPermissions.java
> > new file mode 100644
> > index 0000000..b2d9542
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/CheckPermissions.java
> > @@ -0,0 +1,39 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.api.permission.annotations;
> > +
> > +import static java.lang.annotation.ElementType.METHOD;
> > +import static java.lang.annotation.RetentionPolicy.RUNTIME;
> > +
> > +import java.lang.annotation.Documented;
> > +import java.lang.annotation.Retention;
> > +import java.lang.annotation.Target;
> > +
> > +import
> > org.apache.deltaspike.security.api.authorization.annotation.SecurityBindingType;
> > +
> > +@Target({ METHOD })
> > +@Retention(RUNTIME)
> > +@Documented
> > +
> > +//cdi annotations
> > +@SecurityBindingType
> > +public @interface CheckPermissions
> > +{
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/RequiresPermission.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/RequiresPermission.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/RequiresPermission.java
> > new file mode 100644
> > index 0000000..7428b9b
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/api/permission/annotations/RequiresPermission.java
> > @@ -0,0 +1,34 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.api.permission.annotations;
> > +
> > +import static java.lang.annotation.ElementType.PARAMETER;
> > +import static java.lang.annotation.RetentionPolicy.RUNTIME;
> > +
> > +import java.lang.annotation.Documented;
> > +import java.lang.annotation.Retention;
> > +import java.lang.annotation.Target;
> > +
> > +@Target({ PARAMETER })
> > +@Retention(RUNTIME)
> > +@Documented
> > +public @interface RequiresPermission
> > +{
> > + String value() default "";
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionResolver.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionResolver.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionResolver.java
> > new file mode 100644
> > index 0000000..739f107
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionResolver.java
> > @@ -0,0 +1,43 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.spi.permission;
> > +
> > +import java.io.Serializable;
> > +
> > +/**
> > + * A PermissionResolver may be used to determine access restrictions for
> > application resources. For every
> > + * permission check the application performs, the hasPermission() method
> > of each known PermissionResolver
> > + * is invoked. For the permission check to succeed, at least one
> > PermissionResolver must return a result of
> > + * PermissionStatus.ALLOW. If any PermissionResolver returns a result of
> > PermissionStatus.DENY, the
> > + * permission check is unsuccessful and the user is not allowed to carry
> > out the requested operation.
> > + * If a PermissionResolver does not explicitly allow or deny the
> > permission, it should return a result of
> > + * PermissionStatus.NOT_APPLICABLE.
> > + *
> > + */
> > +public interface PermissionResolver
> > +{
> > + public enum PermissionStatus
> > + {
> > + ALLOW, DENY, NOT_APPLICABLE
> > + }
> > +
> > + PermissionStatus hasPermission(Object resource, String operation);
> > +
> > + PermissionStatus hasPermission(Class<?> resourceClass, Serializable
> > identifier, String operation);
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionStore.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionStore.java
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionStore.java
> > new file mode 100644
> > index 0000000..a0c547f
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/api/src/main/java/org/apache/deltaspike/security/spi/permission/PermissionStore.java
> > @@ -0,0 +1,51 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.spi.permission;
> > +
> > +import java.util.List;
> > +import java.util.Set;
> > +
> > +import org.apache.deltaspike.security.api.permission.Permission;
> > +
> > +/**
> > + *
> > + *
> > + */
> > +public interface PermissionStore
> > +{
> > + List<Permission> listPermissions(Object target);
> > +
> > + List<Permission> listPermissions(Object target, String action);
> > +
> > + List<Permission> listPermissions(Set<Object> targets, String action);
> > +
> > + boolean grantPermission(Permission permission);
> > +
> > + boolean grantPermissions(List<Permission> permissions);
> > +
> > + boolean revokePermission(Permission permission);
> > +
> > + boolean revokePermissions(List<Permission> permissions);
> > +
> > + List<String> listAvailableActions(Object target);
> > +
> > + void clearPermissions(Object target);
> > +
> > + boolean isEnabled();
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/DefaultIdentity.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/DefaultIdentity.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/DefaultIdentity.java
> > index 050cc41..1cb7b1b 100644
> > ---
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/DefaultIdentity.java
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/DefaultIdentity.java
> > @@ -22,6 +22,10 @@ import java.io.Serializable;
> > 
> > import org.apache.deltaspike.core.util.ExceptionUtils;
> > import org.apache.deltaspike.security.api.Identity;
> > +<<<<<<< HEAD
> > +=======
> > +import org.apache.deltaspike.security.api.User;
> > +>>>>>>> added missing files
> > import
> > org.apache.deltaspike.security.api.authentication.AuthenticationException;
> > import
> > org.apache.deltaspike.security.api.authentication.UnexpectedCredentialException;
> > import
> > org.apache.deltaspike.security.api.authentication.event.AlreadyLoggedInEvent;
> > @@ -31,8 +35,12 @@ import
> > org.apache.deltaspike.security.api.authentication.event.PostAuthenticateE
> > import
> > org.apache.deltaspike.security.api.authentication.event.PostLoggedOutEvent;
> > import
> > org.apache.deltaspike.security.api.authentication.event.PreAuthenticateEvent;
> > import
> > org.apache.deltaspike.security.api.authentication.event.PreLoggedOutEvent;
> > +<<<<<<< HEAD
> > import org.apache.deltaspike.security.api.credential.LoginCredentials;
> > import org.apache.deltaspike.security.api.idm.User;
> > +=======
> > +import org.apache.deltaspike.security.api.credential.LoginCredential;
> > +>>>>>>> added missing files
> > import org.apache.deltaspike.security.spi.authentication.Authenticator;
> > import
> > org.apache.deltaspike.security.spi.authentication.Authenticator.AuthenticationStatus;
> > import
> > org.apache.deltaspike.security.spi.authentication.AuthenticatorSelector;
> > @@ -62,7 +70,11 @@ public class DefaultIdentity implements Identity
> > 
> > @Inject
> > @SuppressWarnings("NonSerializableFieldInSerializableClass")
> > +<<<<<<< HEAD
> > private LoginCredentials loginCredential;
> > +=======
> > + private LoginCredential loginCredential;
> > +>>>>>>> added missing files
> > 
> > /**
> > * Flag indicating whether we are currently authenticating
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/AbstractIdentityType.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/AbstractIdentityType.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/AbstractIdentityType.java
> > new file mode 100644
> > index 0000000..bbb3521
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/AbstractIdentityType.java
> > @@ -0,0 +1,81 @@
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import java.util.Date;
> > +import java.util.HashMap;
> > +import java.util.Map;
> > +
> > +import org.apache.deltaspike.security.api.idm.IdentityType;
> > +
> > +/**
> > + * Abstract base class for IdentityType implementations
> > + */
> > +public abstract class AbstractIdentityType implements IdentityType
> > +{
> > + private String key;
> > + private boolean enabled = true;
> > + private Date creationDate = null;
> > + private Date expirationDate = null;
> > + private Map<String,String[]> attributes = new
> > HashMap<String,String[]>();
> > +
> > + @Override
> > + public String getKey()
> > + {
> > + return this.key;
> > + }
> > +
> > + @Override
> > + public boolean isEnabled()
> > + {
> > + return this.enabled;
> > + }
> > +
> > + @Override
> > + public Date getExpirationDate()
> > + {
> > + return this.expirationDate;
> > + }
> > +
> > + @Override
> > + public Date getCreationDate()
> > + {
> > + return this.creationDate;
> > + }
> > +
> > + @Override
> > + public void setAttribute(String name, String value)
> > + {
> > + attributes.put(name, new String[]{value});
> > + }
> > +
> > + @Override
> > + public void setAttribute(String name, String[] values)
> > + {
> > + attributes.put(name, values);
> > + }
> > +
> > + @Override
> > + public void removeAttribute(String name)
> > + {
> > + attributes.remove(name);
> > + }
> > +
> > + @Override
> > + public String getAttribute(String name)
> > + {
> > + String[] vals = attributes.get(name);
> > + return null == vals ? null : ((vals.length != 0) ? vals[0] :
> > null);
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(String name)
> > + {
> > + return attributes.get(name);
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes()
> > + {
> > + return java.util.Collections.unmodifiableMap(attributes);
> > + }
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/DefaultIdentityManager.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/DefaultIdentityManager.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/DefaultIdentityManager.java
> > new file mode 100644
> > index 0000000..752a371
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/DefaultIdentityManager.java
> > @@ -0,0 +1,272 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import java.util.Collection;
> > +import java.util.Date;
> > +
> > +import org.apache.deltaspike.security.api.idm.Group;
> > +import org.apache.deltaspike.security.api.idm.GroupQuery;
> > +import org.apache.deltaspike.security.api.idm.IdentityManager;
> > +import org.apache.deltaspike.security.api.idm.IdentityType;
> > +import org.apache.deltaspike.security.api.idm.MembershipQuery;
> > +import org.apache.deltaspike.security.api.idm.Role;
> > +import org.apache.deltaspike.security.api.idm.RoleQuery;
> > +import org.apache.deltaspike.security.api.idm.User;
> > +import org.apache.deltaspike.security.api.idm.UserQuery;
> > +
> > +/**
> > + * Default implementation of the IdentityManager interface
> > + *
> > + */
> > +public class DefaultIdentityManager implements IdentityManager
> > +{
> > +
> > + @Override
> > + public User createUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeUser(User user)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public User getUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Collection<User> getAllUsers()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group createGroup(String id)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group createGroup(String id, Group parent)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group createGroup(String id, String parent)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeGroup(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeGroup(String groupId)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Group getGroup(String groupId)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group getGroup(String groupId, Group parent)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Collection<Group> getAllGroups()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void addToGroup(IdentityType identityType, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeFromGroup(IdentityType identityType, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Collection<IdentityType> getGroupMembers(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Role createRole(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeRole(Role role)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeRole(String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Role getRole(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Collection<Role> getAllRoles()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Collection<Role> getRoles(IdentityType identityType, Group
> > group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public boolean hasRole(Role role, IdentityType identityType, Group
> > group)
> > + {
> > + // TODO Auto-generated method stub
> > + return false;
> > + }
> > +
> > + @Override
> > + public void grantRole(Role role, IdentityType identityType, Group
> > group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void revokeRole(Role role, IdentityType identityType, Group
> > group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public UserQuery createUserQuery()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public GroupQuery createGroupQuery()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public RoleQuery createRoleQuery()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public MembershipQuery createMembershipQuery()
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public boolean validatePassword(String password)
> > + {
> > + // TODO Auto-generated method stub
> > + return false;
> > + }
> > +
> > + @Override
> > + public void updatePassword(String password)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void setEnabled(IdentityType identityType, boolean enabled)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void setExpirationDate(IdentityType identityType, Date
> > expirationDate)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/JPAIdentityStore.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/JPAIdentityStore.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/JPAIdentityStore.java
> > new file mode 100644
> > index 0000000..040b9e9
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/JPAIdentityStore.java
> > @@ -0,0 +1,238 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import java.util.List;
> > +import java.util.Map;
> > +
> > +import org.apache.deltaspike.security.api.idm.Group;
> > +import org.apache.deltaspike.security.api.idm.GroupQuery;
> > +import org.apache.deltaspike.security.api.idm.Membership;
> > +import org.apache.deltaspike.security.api.idm.MembershipQuery;
> > +import org.apache.deltaspike.security.api.idm.Range;
> > +import org.apache.deltaspike.security.api.idm.Role;
> > +import org.apache.deltaspike.security.api.idm.RoleQuery;
> > +import org.apache.deltaspike.security.api.idm.User;
> > +import org.apache.deltaspike.security.api.idm.UserQuery;
> > +import org.apache.deltaspike.security.spi.idm.IdentityStore;
> > +
> > +/**
> > + * An implementation of IdentityStore backed by a JPA datasource
> > + *
> > + */
> > +public class JPAIdentityStore implements IdentityStore
> > +{
> > +
> > + @Override
> > + public User createUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeUser(User user)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public User getUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group createGroup(String name, Group parent)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeGroup(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Group getGroup(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Role createRole(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeRole(Role role)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Role getRole(String role)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Membership createMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Membership getMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<User> executeQuery(UserQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Group> executeQuery(GroupQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Role> executeQuery(RoleQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Membership> executeQuery(MembershipQuery query, Range
> > range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(User user, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(User user, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(User user, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(User user)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(Group group, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(Group group, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(Group group, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(Role role, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(Role role, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(Role role, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(Role role)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/LDAPIdentityStore.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/LDAPIdentityStore.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/LDAPIdentityStore.java
> > new file mode 100644
> > index 0000000..ba6581c
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/LDAPIdentityStore.java
> > @@ -0,0 +1,238 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import java.util.List;
> > +import java.util.Map;
> > +
> > +import org.apache.deltaspike.security.api.idm.Group;
> > +import org.apache.deltaspike.security.api.idm.GroupQuery;
> > +import org.apache.deltaspike.security.api.idm.Membership;
> > +import org.apache.deltaspike.security.api.idm.MembershipQuery;
> > +import org.apache.deltaspike.security.api.idm.Range;
> > +import org.apache.deltaspike.security.api.idm.Role;
> > +import org.apache.deltaspike.security.api.idm.RoleQuery;
> > +import org.apache.deltaspike.security.api.idm.User;
> > +import org.apache.deltaspike.security.api.idm.UserQuery;
> > +import org.apache.deltaspike.security.spi.idm.IdentityStore;
> > +
> > +/**
> > + * An IdentityStore implementation backed by an LDAP directory
> > + *
> > + */
> > +public class LDAPIdentityStore implements IdentityStore
> > +{
> > +
> > + @Override
> > + public User createUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeUser(User user)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public User getUser(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Group createGroup(String name, Group parent)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeGroup(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Group getGroup(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Role createRole(String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeRole(Role role)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Role getRole(String role)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Membership createMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void removeMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public Membership getMembership(Role role, User user, Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<User> executeQuery(UserQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Group> executeQuery(GroupQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Role> executeQuery(RoleQuery query, Range range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public List<Membership> executeQuery(MembershipQuery query, Range
> > range)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(User user, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(User user, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(User user, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(User user)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(Group group, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(Group group, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(Group group, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(Group group)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public void setAttribute(Role role, String name, String[] values)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public void removeAttribute(Role role, String name)
> > + {
> > + // TODO Auto-generated method stub
> > +
> > + }
> > +
> > + @Override
> > + public String[] getAttributeValues(Role role, String name)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > + @Override
> > + public Map<String, String[]> getAttributes(Role role)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleGroup.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleGroup.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleGroup.java
> > new file mode 100644
> > index 0000000..3ad4089
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleGroup.java
> > @@ -0,0 +1,54 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import org.apache.deltaspike.security.api.idm.Group;
> > +
> > +/**
> > + * Simple implementation of the Group interface
> > + *
> > + */
> > +public class SimpleGroup extends AbstractIdentityType implements Group
> > +{
> > + private String id;
> > + private String name;
> > + private Group parentGroup;
> > +
> > + public SimpleGroup(String id, String name, Group parentGroup)
> > + {
> > + this.id = id;
> > + this.name (http://this.name) = name;
> > + this.parentGroup = parentGroup;
> > + }
> > +
> > + public String getId()
> > + {
> > + return id;
> > + }
> > +
> > + public String getName()
> > + {
> > + return name;
> > + }
> > +
> > + public Group getParentGroup()
> > + {
> > + return parentGroup;
> > + }
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleRole.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleRole.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleRole.java
> > new file mode 100644
> > index 0000000..457a17d
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleRole.java
> > @@ -0,0 +1,40 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import org.apache.deltaspike.security.api.idm.Role;
> > +
> > +/**
> > + * Simple implementation of the Role interface
> > + */
> > +public class SimpleRole extends AbstractIdentityType implements Role
> > +{
> > + private String name;
> > +
> > + public SimpleRole(String name)
> > + {
> > + this.name (http://this.name) = name;
> > + }
> > +
> > + public String getName()
> > + {
> > + return name;
> > + }
> > +
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleUser.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleUser.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleUser.java
> > new file mode 100644
> > index 0000000..f0dd9b7
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/idm/SimpleUser.java
> > @@ -0,0 +1,85 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.idm;
> > +
> > +import org.apache.deltaspike.security.api.idm.User;
> > +
> > +/**
> > + * A simple User implementation
> > + */
> > +public class SimpleUser extends AbstractIdentityType implements User
> > +{
> > + private String id;
> > + private String firstName;
> > + private String lastName;
> > + private String email;
> > +
> > + public SimpleUser(String id)
> > + {
> > + this.id = id;
> > + }
> > +
> > + @Override
> > + public String getId()
> > + {
> > + return id;
> > + }
> > +
> > + @Override
> > + public String getFirstName()
> > + {
> > + return firstName;
> > + }
> > +
> > + @Override
> > + public void setFirstName(String firstName)
> > + {
> > + this.firstName = firstName;
> > + }
> > +
> > + @Override
> > + public String getLastName()
> > + {
> > + return lastName;
> > + }
> > +
> > + @Override
> > + public void setLastName(String lastName)
> > + {
> > + this.lastName = lastName;
> > + }
> > +
> > + @Override
> > + public String getFullName()
> > + {
> > + return String.format("%s %s", firstName, lastName);
> > + }
> > +
> > + @Override
> > + public String getEmail()
> > + {
> > + return email;
> > + }
> > +
> > + @Override
> > + public void setEmail(String email)
> > + {
> > + this.email = email;
> > + }
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PermissionMapper.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PermissionMapper.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PermissionMapper.java
> > new file mode 100644
> > index 0000000..5168b15
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PermissionMapper.java
> > @@ -0,0 +1,78 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.permission;
> > +
> > +import java.io.Serializable;
> > +
> > +import javax.enterprise.inject.Instance;
> > +import javax.inject.Inject;
> > +
> > +import org.apache.deltaspike.security.spi.permission.PermissionResolver;
> > +import
> > org.apache.deltaspike.security.spi.permission.PermissionResolver.PermissionStatus;
> > +
> > +/**
> > + * Uses the available PermissionResolver instances to determine whether
> > an application permission
> > + * is to be allowed or denied.
> > + *
> > + */
> > +public class PermissionMapper
> > +{
> > + @Inject
> > + private Instance<PermissionResolver> resolvers;
> > +
> > + public boolean resolvePermission(Object resource, String operation)
> > + {
> > + boolean permit = false;
> > +
> > + for (PermissionResolver resolver : resolvers)
> > + {
> > + PermissionStatus status = resolver.hasPermission(resource,
> > operation);
> > + if (PermissionStatus.ALLOW.equals(status))
> > + {
> > + permit = true;
> > + }
> > + else if (PermissionStatus.DENY.equals(status))
> > + {
> > + return false;
> > + }
> > + }
> > +
> > + return permit;
> > + }
> > +
> > + public boolean resolvePermission(Class<?> resourceClass, Serializable
> > identifier, String operation)
> > + {
> > + boolean permit = false;
> > +
> > + for (PermissionResolver resolver : resolvers)
> > + {
> > + PermissionStatus status =
> > resolver.hasPermission(resourceClass, identifier, operation);
> > + if (PermissionStatus.ALLOW.equals(status))
> > + {
> > + permit = true;
> > + }
> > + else if (PermissionStatus.DENY.equals(status))
> > + {
> > + return false;
> > + }
> > + }
> > +
> > + return permit;
> > + }
> > +}
> > 
> > 
> > http://git-wip-us.apache.org/repos/asf/incubator-deltaspike/blob/4bc36662/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PersistentPermissionResolver.java
> > ----------------------------------------------------------------------
> > diff --git
> > a/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PersistentPermissionResolver.java
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PersistentPermissionResolver.java
> > new file mode 100644
> > index 0000000..3cb7194
> > --- /dev/null
> > +++
> > b/deltaspike/modules/security/impl/src/main/java/org/apache/deltaspike/security/impl/permission/PersistentPermissionResolver.java
> > @@ -0,0 +1,45 @@
> > +/*
> > + * 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.
> > + */
> > +package org.apache.deltaspike.security.impl.permission;
> > +
> > +import java.io.Serializable;
> > +
> > +import org.apache.deltaspike.security.spi.permission.PermissionResolver;
> > +
> > +/**
> > + * A PermissionResolver implementation that provides ACL-style object
> > permissions, backed by a database.
> > + *
> > + */
> > +public class PersistentPermissionResolver implements PermissionResolver
> > +{
> > +
> > + public PermissionStatus hasPermission(Object resource, String
> > operation)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > +
> > + public PermissionStatus hasPermission(Class<?> resourceClass,
> > Serializable identifier, String operation)
> > + {
> > + // TODO Auto-generated method stub
> > + return null;
> > + }
> > +
> > +}
> > 
> 
> 
> 



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message