Seam SVN: r7935 - branches/Seam_2_0/build.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-04-14 07:53:52 -0400 (Mon, 14 Apr 2008)
New Revision: 7935
Modified:
branches/Seam_2_0/build/root.pom.xml
Log:
JBSEAM-2866
Modified: branches/Seam_2_0/build/root.pom.xml
===================================================================
--- branches/Seam_2_0/build/root.pom.xml 2008-04-14 11:52:31 UTC (rev 7934)
+++ branches/Seam_2_0/build/root.pom.xml 2008-04-14 11:53:52 UTC (rev 7935)
@@ -165,6 +165,10 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
</exclusions>
</dependency>
@@ -177,6 +181,11 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </exclusion>
+
</exclusions>
</dependency>
@@ -199,6 +208,10 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ </exclusion>
</exclusions>
</dependency>
16 years, 7 months
Seam SVN: r7934 - branches/Seam_2_0/build/lib.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-04-14 07:52:31 -0400 (Mon, 14 Apr 2008)
New Revision: 7934
Modified:
branches/Seam_2_0/build/lib/maven-ant-tasks.jar
Log:
upgrade to maven-ant-tasks 2.0.8 from snapshot
Modified: branches/Seam_2_0/build/lib/maven-ant-tasks.jar
===================================================================
(Binary files differ)
16 years, 7 months
Seam SVN: r7933 - in branches/Seam_2_0/doc/Seam_Reference_Guide: en-US/images and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-04-14 06:27:37 -0400 (Mon, 14 Apr 2008)
New Revision: 7933
Added:
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.png
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.xcf
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_action_1.png
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_0.png
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_1.png
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/restart_deployment.png
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/run_test.png
Removed:
branches/Seam_2_0/doc/Seam_Reference_Guide/.cvsignore
Log:
Add resources, remove .cvsignore
Deleted: branches/Seam_2_0/doc/Seam_Reference_Guide/.cvsignore
===================================================================
--- branches/Seam_2_0/doc/Seam_Reference_Guide/.cvsignore 2008-04-14 04:16:30 UTC (rev 7932)
+++ branches/Seam_2_0/doc/Seam_Reference_Guide/.cvsignore 2008-04-14 10:27:37 UTC (rev 7933)
@@ -1 +0,0 @@
-build
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.xcf
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/generate_entities_0.xcf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_action_1.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_action_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_0.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_0.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_1.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/new_form_1.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/restart_deployment.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/restart_deployment.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/run_test.png
===================================================================
(Binary files differ)
Property changes on: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/images/run_test.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 7 months
Seam SVN: r7932 - trunk/src/main/org/jboss/seam/security/permission.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-14 00:16:30 -0400 (Mon, 14 Apr 2008)
New Revision: 7932
Modified:
trunk/src/main/org/jboss/seam/security/permission/Permission.java
Log:
should be immutable
Modified: trunk/src/main/org/jboss/seam/security/permission/Permission.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/Permission.java 2008-04-14 04:13:40 UTC (rev 7931)
+++ trunk/src/main/org/jboss/seam/security/permission/Permission.java 2008-04-14 04:16:30 UTC (rev 7932)
@@ -4,7 +4,7 @@
import java.security.Principal;
/**
- * Base class for permissions
+ * Represents a single permission for a particular target, action and recipient combination.
*
* @author Shane Bryzak
*/
@@ -14,14 +14,16 @@
private String action;
private Principal recipient;
- public Object getTarget()
+ public Permission(Object target, String action, Principal recipient)
{
- return target;
+ this.target = target;
+ this.action = action;
+ this.recipient = recipient;
}
- public void setTarget(Object target)
+ public Object getTarget()
{
- this.target = target;
+ return target;
}
public String getAction()
@@ -29,18 +31,8 @@
return action;
}
- public void setAction(String action)
- {
- this.action = action;
- }
-
public Principal getRecipient()
{
return recipient;
}
-
- public void setRecipient(Principal recipient)
- {
- this.recipient = recipient;
- }
}
16 years, 7 months
Seam SVN: r7931 - in trunk/src/main/org/jboss/seam/security: permission/dynamic and 1 other directory.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-14 00:13:40 -0400 (Mon, 14 Apr 2008)
New Revision: 7931
Added:
trunk/src/main/org/jboss/seam/security/management/BeanProperty.java
Modified:
trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
trunk/src/main/org/jboss/seam/security/permission/dynamic/DynamicPermissionResolver.java
trunk/src/main/org/jboss/seam/security/permission/dynamic/JpaDynamicPermissionStore.java
Log:
minor refactoring, initial configuration work for JpaDynamicPermissionStore
Added: trunk/src/main/org/jboss/seam/security/management/BeanProperty.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/BeanProperty.java (rev 0)
+++ trunk/src/main/org/jboss/seam/security/management/BeanProperty.java 2008-04-14 04:13:40 UTC (rev 7931)
@@ -0,0 +1,173 @@
+package org.jboss.seam.security.management;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+/**
+ * A convenience class for working with an annotated property (either a field or method) of
+ * a JavaBean class.
+ *
+ * @author Shane Bryzak
+ */
+public class BeanProperty
+{
+ private Field propertyField;
+ private Method propertyGetter;
+ private Method propertySetter;
+ private Annotation annotation;
+ private String name;
+ private Class propertyClass;
+
+ private boolean isFieldProperty;
+
+ private BeanProperty(Field propertyField, Annotation annotation)
+ {
+ this.propertyField = propertyField;
+ isFieldProperty = true;
+ this.annotation = annotation;
+ this.name = propertyField.getName();
+ this.propertyClass = propertyField.getDeclaringClass();
+ }
+
+ private BeanProperty(Method propertyMethod, Annotation annotation)
+ {
+ if (!(propertyMethod.getName().startsWith("get") || (propertyMethod.getName().startsWith("is"))))
+ {
+ throw new IllegalArgumentException("Bean property method name " + propertyMethod.getClass().getName() +
+ "." + propertyMethod.getName() + "() must start with \"get\" or \"is\".");
+ }
+
+ if (propertyMethod.getReturnType().equals(void.class) || propertyMethod.getParameterTypes().length > 0)
+ {
+ throw new IllegalArgumentException("Bean property method " + propertyMethod.getClass().getName() +
+ "." + propertyMethod.getName() + "() must return a value and take no parameters");
+ }
+
+ this.propertyGetter = propertyMethod;
+ this.propertyClass = propertyMethod.getReturnType();
+
+ String methodName = propertyMethod.getName();
+
+ this.name = methodName.startsWith("get") ?
+ (methodName.substring(3,4).toLowerCase() + methodName.substring(4)) :
+ (methodName.substring(2,3).toLowerCase() + methodName.substring(3));
+
+ String setterName = propertyMethod.getName().startsWith("get") ?
+ ("set" + methodName.substring(3)) : ("set" + methodName.substring(2));
+
+ try
+ {
+ propertySetter = propertyMethod.getDeclaringClass().getMethod(setterName, new Class[] {propertyMethod.getReturnType()});
+ }
+ catch (NoSuchMethodException ex)
+ {
+ throw new IllegalArgumentException("Bean property method " + propertyMethod.getClass().getName() +
+ "." + propertyMethod.getName() + "() must have a corresponding setter method.");
+ }
+
+ isFieldProperty = false;
+ this.annotation = annotation;
+ }
+
+ public void setValue(Object bean, Object value)
+ {
+ if (isFieldProperty)
+ {
+ boolean accessible = propertyField.isAccessible();
+ try
+ {
+ propertyField.setAccessible(true);
+ propertyField.set(bean, value);
+ }
+ catch (IllegalAccessException ex)
+ {
+ throw new RuntimeException("Exception setting bean property", ex);
+ }
+ finally
+ {
+ propertyField.setAccessible(accessible);
+ }
+ }
+ else
+ {
+ try
+ {
+ propertySetter.invoke(bean, value);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Exception setting bean property", ex);
+ }
+ }
+ }
+
+ public Object getValue(Object bean)
+ {
+ if (isFieldProperty)
+ {
+ boolean accessible = propertyField.isAccessible();
+ try
+ {
+ propertyField.setAccessible(true);
+ return propertyField.get(bean);
+ }
+ catch (IllegalAccessException ex)
+ {
+ throw new RuntimeException("Exception getting bean property", ex);
+ }
+ finally
+ {
+ propertyField.setAccessible(accessible);
+ }
+ }
+ else
+ {
+ try
+ {
+ return propertyGetter.invoke(bean);
+ }
+ catch (Exception ex)
+ {
+ throw new RuntimeException("Exception getting bean property", ex);
+ }
+ }
+ }
+
+ public Annotation getAnnotation()
+ {
+ return annotation;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public Class getPropertyClass()
+ {
+ return propertyClass;
+ }
+
+
+ public static BeanProperty scanForProperty(Class cls, Class<? extends Annotation> annotation)
+ {
+ for (Field f : cls.getFields())
+ {
+ if (f.isAnnotationPresent(annotation))
+ {
+ return new BeanProperty(f, f.getAnnotation(annotation));
+ }
+ }
+
+ for (Method m : cls.getMethods())
+ {
+ if (m.isAnnotationPresent(annotation))
+ {
+ return new BeanProperty(m, m.getAnnotation(annotation));
+ }
+ }
+
+ return null;
+ }
+}
\ No newline at end of file
Modified: trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-04-14 04:11:00 UTC (rev 7930)
+++ trunk/src/main/org/jboss/seam/security/management/JpaIdentityStore.java 2008-04-14 04:13:40 UTC (rev 7931)
@@ -4,9 +4,6 @@
import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
@@ -62,148 +59,8 @@
private ValueExpression<EntityManager> entityManager;
private Class userClass;
- private Class roleClass;
+ private Class roleClass;
- protected final class BeanProperty
- {
- private Field propertyField;
- private Method propertyGetter;
- private Method propertySetter;
- private Annotation annotation;
- private String name;
- private Class propertyClass;
-
- private boolean isFieldProperty;
-
- public BeanProperty(Field propertyField, Annotation annotation)
- {
- this.propertyField = propertyField;
- isFieldProperty = true;
- this.annotation = annotation;
- this.name = propertyField.getName();
- this.propertyClass = propertyField.getDeclaringClass();
- }
-
- public BeanProperty(Method propertyMethod, Annotation annotation)
- {
- if (!(propertyMethod.getName().startsWith("get") || (propertyMethod.getName().startsWith("is"))))
- {
- throw new IllegalArgumentException("Bean property method name " + propertyMethod.getClass().getName() +
- "." + propertyMethod.getName() + "() must start with \"get\" or \"is\".");
- }
-
- if (propertyMethod.getReturnType().equals(void.class) || propertyMethod.getParameterTypes().length > 0)
- {
- throw new IllegalArgumentException("Bean property method " + propertyMethod.getClass().getName() +
- "." + propertyMethod.getName() + "() must return a value and take no parameters");
- }
-
- this.propertyGetter = propertyMethod;
- this.propertyClass = propertyMethod.getReturnType();
-
- String methodName = propertyMethod.getName();
-
- this.name = methodName.startsWith("get") ?
- (methodName.substring(3,4).toLowerCase() + methodName.substring(4)) :
- (methodName.substring(2,3).toLowerCase() + methodName.substring(3));
-
- String setterName = propertyMethod.getName().startsWith("get") ?
- ("set" + methodName.substring(3)) : ("set" + methodName.substring(2));
-
- try
- {
- propertySetter = propertyMethod.getDeclaringClass().getMethod(setterName, new Class[] {propertyMethod.getReturnType()});
- }
- catch (NoSuchMethodException ex)
- {
- throw new IllegalArgumentException("Bean property method " + propertyMethod.getClass().getName() +
- "." + propertyMethod.getName() + "() must have a corresponding setter method.");
- }
-
- isFieldProperty = false;
- this.annotation = annotation;
- }
-
- public void setValue(Object bean, Object value)
- {
- if (isFieldProperty)
- {
- boolean accessible = propertyField.isAccessible();
- try
- {
- propertyField.setAccessible(true);
- propertyField.set(bean, value);
- }
- catch (IllegalAccessException ex)
- {
- throw new RuntimeException("Exception setting bean property", ex);
- }
- finally
- {
- propertyField.setAccessible(accessible);
- }
- }
- else
- {
- try
- {
- propertySetter.invoke(bean, value);
- }
- catch (Exception ex)
- {
- throw new RuntimeException("Exception setting bean property", ex);
- }
- }
- }
-
- public Object getValue(Object bean)
- {
- if (isFieldProperty)
- {
- boolean accessible = propertyField.isAccessible();
- try
- {
- propertyField.setAccessible(true);
- return propertyField.get(bean);
- }
- catch (IllegalAccessException ex)
- {
- throw new RuntimeException("Exception getting bean property", ex);
- }
- finally
- {
- propertyField.setAccessible(accessible);
- }
- }
- else
- {
- try
- {
- return propertyGetter.invoke(bean);
- }
- catch (Exception ex)
- {
- throw new RuntimeException("Exception getting bean property", ex);
- }
- }
- }
-
- public Annotation getAnnotation()
- {
- return annotation;
- }
-
- public String getName()
- {
- return name;
- }
-
- public Class getPropertyClass()
- {
- return propertyClass;
- }
- }
-
private BeanProperty userPrincipalProperty;
private BeanProperty userPasswordProperty;
private BeanProperty userRolesProperty;
@@ -259,15 +116,15 @@
private void initProperties()
{
- userPrincipalProperty = scanForProperty(userClass, UserPrincipal.class);
- userPasswordProperty = scanForProperty(userClass, UserPassword.class);
- userRolesProperty = scanForProperty(userClass, UserRoles.class);
- userEnabledProperty = scanForProperty(userClass, UserEnabled.class);
- userFirstNameProperty = scanForProperty(userClass, UserFirstName.class);
- userLastNameProperty = scanForProperty(userClass, UserLastName.class);
+ userPrincipalProperty = BeanProperty.scanForProperty(userClass, UserPrincipal.class);
+ userPasswordProperty = BeanProperty.scanForProperty(userClass, UserPassword.class);
+ userRolesProperty = BeanProperty.scanForProperty(userClass, UserRoles.class);
+ userEnabledProperty = BeanProperty.scanForProperty(userClass, UserEnabled.class);
+ userFirstNameProperty = BeanProperty.scanForProperty(userClass, UserFirstName.class);
+ userLastNameProperty = BeanProperty.scanForProperty(userClass, UserLastName.class);
- roleNameProperty = scanForProperty(roleClass, RoleName.class);
- roleGroupsProperty = scanForProperty(roleClass, RoleGroups.class);
+ roleNameProperty = BeanProperty.scanForProperty(roleClass, RoleName.class);
+ roleGroupsProperty = BeanProperty.scanForProperty(roleClass, RoleGroups.class);
if (userPrincipalProperty == null)
{
@@ -294,27 +151,6 @@
}
}
- private BeanProperty scanForProperty(Class cls, Class<? extends Annotation> annotation)
- {
- for (Field f : cls.getFields())
- {
- if (f.isAnnotationPresent(annotation))
- {
- return new BeanProperty(f, f.getAnnotation(annotation));
- }
- }
-
- for (Method m : cls.getMethods())
- {
- if (m.isAnnotationPresent(annotation))
- {
- return new BeanProperty(m, m.getAnnotation(annotation));
- }
- }
-
- return null;
- }
-
public boolean createUser(String username, String password, String firstname, String lastname)
{
try
Modified: trunk/src/main/org/jboss/seam/security/permission/dynamic/DynamicPermissionResolver.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/dynamic/DynamicPermissionResolver.java 2008-04-14 04:11:00 UTC (rev 7930)
+++ trunk/src/main/org/jboss/seam/security/permission/dynamic/DynamicPermissionResolver.java 2008-04-14 04:13:40 UTC (rev 7931)
@@ -34,7 +34,7 @@
@Startup
public class DynamicPermissionResolver implements PermissionResolver, Serializable
{
- private static final String DEFAULT_PERMISSION_STORE_NAME = "accountPermissionStore";
+ private static final String DEFAULT_PERMISSION_STORE_NAME = "jpaDynamicPermissionStore";
private PermissionStore permissionStore;
@@ -90,7 +90,7 @@
for (Permission permission : permissions)
{
- if (username.equals(permission.getRecipient()))
+ if (username.equals(permission.getRecipient().getName()))
{
return true;
}
Modified: trunk/src/main/org/jboss/seam/security/permission/dynamic/JpaDynamicPermissionStore.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/permission/dynamic/JpaDynamicPermissionStore.java 2008-04-14 04:11:00 UTC (rev 7930)
+++ trunk/src/main/org/jboss/seam/security/permission/dynamic/JpaDynamicPermissionStore.java 2008-04-14 04:13:40 UTC (rev 7931)
@@ -1,6 +1,7 @@
package org.jboss.seam.security.permission.dynamic;
import static org.jboss.seam.ScopeType.APPLICATION;
+import static org.jboss.seam.annotations.Install.BUILT_IN;
import java.io.Serializable;
import java.util.List;
@@ -8,9 +9,22 @@
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
-import org.jboss.seam.Component;
+import org.jboss.seam.annotations.Create;
+import org.jboss.seam.annotations.Install;
+import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.annotations.security.permission.PermissionAction;
+import org.jboss.seam.annotations.security.permission.PermissionDiscriminator;
+import org.jboss.seam.annotations.security.permission.PermissionRole;
+import org.jboss.seam.annotations.security.permission.PermissionTarget;
+import org.jboss.seam.annotations.security.permission.PermissionUser;
+import org.jboss.seam.core.Expressions;
+import org.jboss.seam.core.Expressions.ValueExpression;
+import org.jboss.seam.log.LogProvider;
+import org.jboss.seam.log.Logging;
+import org.jboss.seam.security.management.BeanProperty;
+import org.jboss.seam.security.management.IdentityManagementException;
import org.jboss.seam.security.permission.Permission;
import org.jboss.seam.security.permission.PermissionStore;
@@ -19,29 +33,94 @@
*
* @author Shane Bryzak
*/
+@Name("org.jboss.seam.security.permission.jpaDynamicPermissionStore")
+@Install(precedence = BUILT_IN, value=false)
@Scope(APPLICATION)
@BypassInterceptors
public class JpaDynamicPermissionStore implements PermissionStore, Serializable
{
- private String entityManagerName = "entityManager";
+ private static final LogProvider log = Logging.getLogProvider(JpaDynamicPermissionStore.class);
- private Class permissionClass;
+ private ValueExpression<EntityManager> entityManager;
+ private Class userPermissionClass;
+ private Class rolePermissionClass;
+
+ private BeanProperty userProperty;
+ private BeanProperty roleProperty;
+
+ private BeanProperty targetProperty;
+ private BeanProperty actionProperty;
+ private BeanProperty discriminatorProperty;
+
+ private BeanProperty roleTargetProperty;
+ private BeanProperty roleActionProperty;
+
+ @Create
+ public void init()
+ {
+ if (userPermissionClass == null)
+ {
+ log.debug("No permissionClass set, JpaDynamicPermissionStore will be unavailable.");
+ return;
+ }
+
+ if (entityManager == null)
+ {
+ entityManager = Expressions.instance().createValueExpression("#{entityManager}", EntityManager.class);
+ }
+
+ initProperties();
+ }
+
+ private void initProperties()
+ {
+ userProperty = BeanProperty.scanForProperty(userPermissionClass, PermissionUser.class);
+ targetProperty = BeanProperty.scanForProperty(userPermissionClass, PermissionTarget.class);
+ actionProperty = BeanProperty.scanForProperty(userPermissionClass, PermissionAction.class);
+
+ if (rolePermissionClass != null)
+ {
+ roleProperty = BeanProperty.scanForProperty(rolePermissionClass, PermissionRole.class);
+ if (roleProperty != null)
+ {
+ roleTargetProperty = BeanProperty.scanForProperty(rolePermissionClass, PermissionTarget.class);
+ roleActionProperty = BeanProperty.scanForProperty(rolePermissionClass, PermissionAction.class);
+ }
+ }
+ else
+ {
+ roleProperty = BeanProperty.scanForProperty(userPermissionClass, PermissionRole.class);
+ if (roleProperty != null)
+ {
+ discriminatorProperty = BeanProperty.scanForProperty(userPermissionClass, PermissionDiscriminator.class);
+ }
+ }
+
+ if (userProperty == null)
+ {
+ throw new IdentityManagementException("Invalid userPermissionClass " + userPermissionClass.getName() +
+ " - required annotation @PermissionUser not found on any Field or Method.");
+ }
+
+ // TODO additional validation checks for both permission classes
+ }
+
public boolean grantPermission(Permission permission)
{
try
{
- if (permissionClass == null)
+ if (userPermissionClass == null)
{
throw new RuntimeException("Could not grant permission, permissionClass not set");
}
- Object instance = permissionClass.newInstance();
+ Object instance = userPermissionClass.newInstance();
// instance.setTarget(permission.getTarget());
// instance.setAction(permission.getAction());
// instance.setAccount(permission.getRecipient());
- getEntityManager().persist(instance);
+ lookupEntityManager().persist(instance);
return true;
}
@@ -55,10 +134,10 @@
{
try
{
- EntityManager em = getEntityManager();
+ EntityManager em = lookupEntityManager();
Object instance = em.createQuery(
- "from " + permissionClass.getName() +
+ "from " + userPermissionClass.getName() +
" where target = :target and action = :action and account = :account " +
" and accountType = :accountType")
.setParameter("target", permission.getTarget())
@@ -77,8 +156,8 @@
public List<Permission> listPermissions(Object target, String action)
{
- return getEntityManager().createQuery(
- "from " + permissionClass.getName() +
+ return lookupEntityManager().createQuery(
+ "from " + userPermissionClass.getName() +
" where target = :target and action = :action")
.setParameter("target", target)
.setParameter("action", action)
@@ -87,34 +166,44 @@
public List<Permission> listPermissions(Object target)
{
- return getEntityManager().createQuery(
- "from " + permissionClass.getName() + " where target = :target")
+ return lookupEntityManager().createQuery(
+ "from " + userPermissionClass.getName() + " where target = :target")
.setParameter("target", target)
.getResultList();
}
- private EntityManager getEntityManager()
+ private EntityManager lookupEntityManager()
{
- return (EntityManager) Component.getInstance(entityManagerName);
+ return entityManager.getValue();
}
- public String getEntityManagerName()
+ public ValueExpression getEntityManager()
{
- return entityManagerName;
+ return entityManager;
}
- public void setEntityManagerName(String name)
+ public void setEntityManager(ValueExpression expression)
{
- this.entityManagerName = name;
- }
+ this.entityManager = expression;
+ }
- public Class getPermissionClass()
+ public Class getUserPermissionClass()
{
- return permissionClass;
+ return userPermissionClass;
}
- public void setPermissionClass(Class permissionClass)
+ public void setUserPermissionClass(Class userPermissionClass)
{
- this.permissionClass = permissionClass;
+ this.userPermissionClass = userPermissionClass;
}
+
+ public Class getRolePermissionClass()
+ {
+ return rolePermissionClass;
+ }
+
+ public void setRolePermissionClass(Class rolePermissionClass)
+ {
+ this.rolePermissionClass = rolePermissionClass;
+ }
}
16 years, 7 months
Seam SVN: r7930 - trunk/src/main/org/jboss/seam.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-14 00:11:00 -0400 (Mon, 14 Apr 2008)
New Revision: 7930
Modified:
trunk/src/main/org/jboss/seam/Component.java
Log:
annotation name changed
Modified: trunk/src/main/org/jboss/seam/Component.java
===================================================================
--- trunk/src/main/org/jboss/seam/Component.java 2008-04-14 04:03:34 UTC (rev 7929)
+++ trunk/src/main/org/jboss/seam/Component.java 2008-04-14 04:11:00 UTC (rev 7930)
@@ -82,7 +82,7 @@
import org.jboss.seam.annotations.faces.Validator;
import org.jboss.seam.annotations.intercept.InterceptorType;
import org.jboss.seam.annotations.intercept.Interceptors;
-import org.jboss.seam.annotations.security.PermissionAction;
+import org.jboss.seam.annotations.security.PermissionCheck;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.annotations.web.RequestParameter;
import org.jboss.seam.async.AsynchronousInterceptor;
@@ -1085,7 +1085,7 @@
{
for (Annotation annotation : method.getAnnotations())
{
- if (annotation.annotationType().isAnnotationPresent(PermissionAction.class))
+ if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class))
{
secure = true;
break;
16 years, 7 months
Seam SVN: r7929 - in trunk/src/main/org/jboss/seam: annotations/security/permission and 1 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-04-14 00:03:34 -0400 (Mon, 14 Apr 2008)
New Revision: 7929
Added:
trunk/src/main/org/jboss/seam/annotations/security/PermissionCheck.java
trunk/src/main/org/jboss/seam/annotations/security/permission/
trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionAction.java
trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java
trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionRole.java
trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionTarget.java
trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionUser.java
Removed:
trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java
Modified:
trunk/src/main/org/jboss/seam/annotations/security/Delete.java
trunk/src/main/org/jboss/seam/annotations/security/Insert.java
trunk/src/main/org/jboss/seam/annotations/security/Read.java
trunk/src/main/org/jboss/seam/annotations/security/Update.java
trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
Log:
renamed PermissionAction -> PermissionCheck, new permission annotations
Modified: trunk/src/main/org/jboss/seam/annotations/security/Delete.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/Delete.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/annotations/security/Delete.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -17,7 +17,7 @@
@Documented
@Retention(RUNTIME)
@Inherited
-@PermissionAction("delete")
+@PermissionCheck("delete")
public @interface Delete {
Class value();
}
Modified: trunk/src/main/org/jboss/seam/annotations/security/Insert.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/Insert.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/annotations/security/Insert.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -17,7 +17,7 @@
@Documented
@Retention(RUNTIME)
@Inherited
-@PermissionAction("insert")
+@PermissionCheck("insert")
public @interface Insert {
Class value();
}
Deleted: trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/annotations/security/PermissionAction.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -1,24 +0,0 @@
-package org.jboss.seam.annotations.security;
-
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Inherited;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * Meta-annotation that designates an annotation as being a permission action,
- * requiring a security check prior to invoking the annotated method or class
- *
- * @author Shane Bryzak
- */
-@Target({TYPE})
-@Documented
-@Retention(RUNTIME)
-@Inherited
-public @interface PermissionAction
-{
- String value() default "";
-}
Added: trunk/src/main/org/jboss/seam/annotations/security/PermissionCheck.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/PermissionCheck.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/PermissionCheck.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security;
+
+import static java.lang.annotation.ElementType.TYPE;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Meta-annotation that designates an annotation as being a permission action,
+ * requiring a security check prior to invoking the annotated method or class
+ *
+ * @author Shane Bryzak
+ */
+@Target({TYPE})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionCheck
+{
+ String value() default "";
+}
Modified: trunk/src/main/org/jboss/seam/annotations/security/Read.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/Read.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/annotations/security/Read.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -17,7 +17,7 @@
@Documented
@Retention(RUNTIME)
@Inherited
-@PermissionAction("read")
+@PermissionCheck("read")
public @interface Read {
Class value();
}
Modified: trunk/src/main/org/jboss/seam/annotations/security/Update.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/Update.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/annotations/security/Update.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -17,7 +17,7 @@
@Documented
@Retention(RUNTIME)
@Inherited
-@PermissionAction("update")
+@PermissionCheck("update")
public @interface Update {
Class value();
}
Added: trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionAction.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionAction.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionAction.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,25 @@
+package org.jboss.seam.annotations.security.permission;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the action component of a permission, e.g. "update",
+ * "delete".
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionAction
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionDiscriminator.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,25 @@
+package org.jboss.seam.annotations.security.permission;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the discriminator column in a permission table
+ * that contains permissions for both roles and users.
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionDiscriminator
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionRole.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionRole.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionRole.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.permission;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the role that a permission is assigned to.
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionRole
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionTarget.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionTarget.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionTarget.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,24 @@
+package org.jboss.seam.annotations.security.permission;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the target of a permission.
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionTarget
+{
+
+}
Added: trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionUser.java
===================================================================
--- trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionUser.java (rev 0)
+++ trunk/src/main/org/jboss/seam/annotations/security/permission/PermissionUser.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -0,0 +1,25 @@
+package org.jboss.seam.annotations.security.permission;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+/**
+ * Flags an entity field or method as representing the principal (username) that a permission is
+ * assigned to.
+ *
+ * @author Shane Bryzak
+ */
+@Target({METHOD,FIELD})
+@Documented
+@Retention(RUNTIME)
+@Inherited
+public @interface PermissionUser
+{
+
+}
Modified: trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java
===================================================================
--- trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-04-13 22:55:00 UTC (rev 7928)
+++ trunk/src/main/org/jboss/seam/security/SecurityInterceptor.java 2008-04-14 04:03:34 UTC (rev 7929)
@@ -8,7 +8,7 @@
import org.jboss.seam.annotations.intercept.AroundInvoke;
import org.jboss.seam.annotations.intercept.Interceptor;
import org.jboss.seam.annotations.intercept.InterceptorType;
-import org.jboss.seam.annotations.security.PermissionAction;
+import org.jboss.seam.annotations.security.PermissionCheck;
import org.jboss.seam.annotations.security.Restrict;
import org.jboss.seam.async.AsynchronousInterceptor;
import org.jboss.seam.intercept.AbstractInterceptor;
@@ -114,9 +114,9 @@
for (Annotation annotation : method.getAnnotations())
{
- if (annotation.annotationType().isAnnotationPresent(PermissionAction.class))
+ if (annotation.annotationType().isAnnotationPresent(PermissionCheck.class))
{
- PermissionAction permissionAction = annotation.annotationType().getAnnotation(PermissionAction.class);
+ PermissionCheck permissionAction = annotation.annotationType().getAnnotation(PermissionCheck.class);
Method valueMethod = null;
for (Method m : annotation.annotationType().getDeclaredMethods())
16 years, 7 months
Seam SVN: r7928 - trunk/doc/reference/en/modules and 1 other directory.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-04-13 18:55:00 -0400 (Sun, 13 Apr 2008)
New Revision: 7928
Modified:
branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/Security.xml
trunk/doc/reference/en/modules/security.xml
Log:
Remove authenticate-method (confusing!)
Modified: branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/Security.xml
===================================================================
--- branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/Security.xml 2008-04-13 20:28:05 UTC (rev 7927)
+++ branches/Seam_2_0/doc/Seam_Reference_Guide/en-US/Security.xml 2008-04-13 22:55:00 UTC (rev 7928)
@@ -501,8 +501,7 @@
provided by JBoss AS), then the entry in <literal>components.xml</literal> would look like this:
</para>
- <programlisting role="XML"><![CDATA[<security:identity authenticate-method="#{authenticator.authenticate}"
- jaas-config-name="other"/>]]></programlisting>
+ <programlisting role="XML"><![CDATA[<security:identity jaas-config-name="other"/>]]></programlisting>
<para>
Please keep in mind that doing this does not mean that your user will be authenticated in whichever
Modified: trunk/doc/reference/en/modules/security.xml
===================================================================
--- trunk/doc/reference/en/modules/security.xml 2008-04-13 20:28:05 UTC (rev 7927)
+++ trunk/doc/reference/en/modules/security.xml 2008-04-13 22:55:00 UTC (rev 7928)
@@ -499,8 +499,7 @@
provided by JBoss AS), then the entry in <literal>components.xml</literal> would look like this:
</para>
- <programlisting><![CDATA[<security:identity authenticate-method="#{authenticator.authenticate}"
- jaas-config-name="other"/>]]></programlisting>
+ <programlisting><![CDATA[<security:identity jaas-config-name="other"/>]]></programlisting>
<para>
Please keep in mind that doing this does not mean that your user will be authenticated in whichever
16 years, 7 months
Seam SVN: r7927 - trunk/seam-gen.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-04-13 16:28:05 -0400 (Sun, 13 Apr 2008)
New Revision: 7927
Modified:
trunk/seam-gen/build.xml
Log:
remove extra spaces
Modified: trunk/seam-gen/build.xml
===================================================================
--- trunk/seam-gen/build.xml 2008-04-13 20:27:21 UTC (rev 7926)
+++ trunk/seam-gen/build.xml 2008-04-13 20:28:05 UTC (rev 7927)
@@ -210,7 +210,7 @@
<property name="old.project.type" value="ear"/>
<input addproperty="project.type.new"
- message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${old.project.type}] "
+ message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${old.project.type}]"
validargs="ear,war"
defaultvalue="${old.project.type}"/>
@@ -234,7 +234,7 @@
</condition>
<property name="database.type.default" value="hsql"/>
<input addproperty="database.type.new"
- message="What kind of database are you using? [${database.type.default}] "
+ message="What kind of database are you using? [${database.type.default}]"
validargs="hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,h2"
defaultvalue="${database.type.default}"/>
@@ -404,13 +404,13 @@
<property name="old.database.exists" value="n"/>
<input addproperty="database.exists.new"
- message="Are you working with tables that already exist in the database? [${old.database.exists}] "
+ message="Are you working with tables that already exist in the database? [${old.database.exists}]"
validargs="y,n"
defaultvalue="${old.database.exists}"/>
<property name="old.database.drop" value="n"/>
<input addproperty="database.drop.new"
- message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${old.database.drop}] "
+ message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${old.database.drop}]"
validargs="y,n"
defaultvalue="${old.database.drop}"/>
@@ -555,7 +555,7 @@
<target name="query-input">
<property name="entity.name.default" value="Entity" />
<input addproperty="entity.name"
- message="Enter the entity class to search for [${entity.name.default}] "
+ message="Enter the entity class to search for [${entity.name.default}]"
defaultvalue="${entity.name}"/>
<property name="entity.file" value="${project.home}/src/${model.dir}/${entity.name}.java" />
@@ -696,7 +696,7 @@
</target>
<target name="file-copy" depends="file-copy-war,file-copy-ear,setup-filters">
-
+
<copy todir="${project.home}/resources">
<fileset dir="${base.dir}/resources/">
<exclude name="datasource-ds.xml"/>
16 years, 7 months
Seam SVN: r7926 - branches/Seam_2_0/seam-gen.
by seam-commits@lists.jboss.org
Author: dan.j.allen
Date: 2008-04-13 16:27:21 -0400 (Sun, 13 Apr 2008)
New Revision: 7926
Modified:
branches/Seam_2_0/seam-gen/build.xml
Log:
remove extra spaces
Modified: branches/Seam_2_0/seam-gen/build.xml
===================================================================
--- branches/Seam_2_0/seam-gen/build.xml 2008-04-13 20:25:05 UTC (rev 7925)
+++ branches/Seam_2_0/seam-gen/build.xml 2008-04-13 20:27:21 UTC (rev 7926)
@@ -209,7 +209,7 @@
<property name="old.project.type" value="ear"/>
<input addproperty="project.type.new"
- message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${old.project.type}] "
+ message="Is this project deployed as an EAR (with EJB components) or a WAR (with no EJB support) [${old.project.type}]"
validargs="ear,war"
defaultvalue="${old.project.type}"/>
@@ -233,7 +233,7 @@
</condition>
<property name="database.type.default" value="hsql"/>
<input addproperty="database.type.new"
- message="What kind of database are you using? [${database.type.default}] "
+ message="What kind of database are you using? [${database.type.default}]"
validargs="hsql,mysql,oracle,postgres,mssql,db2,sybase,enterprisedb,h2"
defaultvalue="${database.type.default}"/>
@@ -403,13 +403,13 @@
<property name="old.database.exists" value="n"/>
<input addproperty="database.exists.new"
- message="Are you working with tables that already exist in the database? [${old.database.exists}] "
+ message="Are you working with tables that already exist in the database? [${old.database.exists}]"
validargs="y,n"
defaultvalue="${old.database.exists}"/>
<property name="old.database.drop" value="n"/>
<input addproperty="database.drop.new"
- message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${old.database.drop}] "
+ message="Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [${old.database.drop}]"
validargs="y,n"
defaultvalue="${old.database.drop}"/>
@@ -554,7 +554,7 @@
<target name="query-input">
<property name="entity.name.default" value="Entity" />
<input addproperty="entity.name"
- message="Enter the entity class to search for [${entity.name.default}] "
+ message="Enter the entity class to search for [${entity.name.default}]"
defaultvalue="${entity.name}"/>
<property name="entity.file" value="${project.home}/src/${model.dir}/${entity.name}.java" />
16 years, 7 months