[JBoss JIRA] Created: (SEAMINTL-4) Named parameters in localized messages
by Aslak Knutsen (JIRA)
Named parameters in localized messages
--------------------------------------
Key: SEAMINTL-4
URL: https://jira.jboss.org/browse/SEAMINTL-4
Project: Seam i18n
Issue Type: Feature Request
Components: Messages
Reporter: Aslak Knutsen
Priority: Minor
When coming back to localized message files after being away for a while, it's always a problem to remember what object/value parameter {2} is suppose to be. At this point you have to find the specific message location in the source code and read through the code to figure out what's actually being passed in.
It's also hard to send the file over to someone for translation, because they most likely also need an explanation of what {2} is.
It would be nice to be able to used named parameters, but with Java(< 7) that is a bit of a pain to code.
Would it be possible with some middle ground;
e.g. A name/alias in the message file that is ignored by the parser, but there just for documentation.
(Maybe even function as a named parameter when Java 7 comes out?)
"Welcome {0:firstName} {1:lastName}!"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (SEAMSECURITY-70) Calling RoleManager.removeRole(Roletype rt, User u, Group g) throws an NPE
by Charles Louppe (JIRA)
Calling RoleManager.removeRole(Roletype rt,User u, Group g) throws an NPE
-------------------------------------------------------------------------
Key: SEAMSECURITY-70
URL: https://issues.jboss.org/browse/SEAMSECURITY-70
Project: Seam Security
Issue Type: Bug
Reporter: Charles Louppe
Hi,
I tried to use the function removeRole(Roletype rt,User u, Group g) of the class RoleManagerImpl which throws me an NullPointerException.
I have fixed the bug, which was in the class JPAIdentityStore in the method removeRelationship :
{code:java}
public void removeRelationship(IdentityStoreInvocationContext ctx,
IdentityObject fromIdentity, IdentityObject toIdentity,
IdentityObjectRelationshipType relationshipType,
String relationshipName) throws IdentityException {
Property<?> fromProperty = modelProperties.get(PROPERTY_RELATIONSHIP_FROM);
Property<?> toProperty = modelProperties.get(PROPERTY_RELATIONSHIP_TO);
Property<?> relationshipTypeProp = modelProperties.get(PROPERTY_RELATIONSHIP_TYPE);
EntityManager em = getEntityManager(ctx);
CriteriaBuilder builder = em.getCriteriaBuilder();
CriteriaQuery<?> criteria = builder.createQuery(identityClass);
Root<?> root = criteria.from(identityClass);
List<Predicate> predicates = new ArrayList<Predicate>();
predicates.add(builder.equal(root.get(fromProperty.getName()),
lookupIdentity(fromIdentity, em)));
predicates.add(builder.equal(root.get(toProperty.getName()),
lookupIdentity(toIdentity, em)));
predicates.add(builder.equal(root.get(relationshipTypeProp.getName()),
lookupRelationshipType(relationshipType, em)));
criteria.where(predicates.toArray(new Predicate[predicates.size()]));
Object relationship = em.createQuery(criteria).getSingleResult();
em.remove(relationship);
}
{code}
The bug is due to those following lines :
CriteriaQuery<?> criteria = builder.createQuery(identityClass);
Root<?> root = criteria.from(identityClass);
It should be instead :
CriteriaQuery<?> criteria = builder.createQuery(relationshipClass);
Root<?> root = criteria.from(relationshipClass);
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (SEAMSECURITY-74) Add <distributable/> to web-fragment.xml
by Jozef Hartinger (JIRA)
Add <distributable/> to web-fragment.xml
----------------------------------------
Key: SEAMSECURITY-74
URL: https://issues.jboss.org/browse/SEAMSECURITY-74
Project: Seam Security
Issue Type: Feature Request
Affects Versions: 3.0.0.Final
Reporter: Jozef Hartinger
Priority: Critical
The semantics of the <distributable/> element in web.xml is such that all web fragments have to have one if the web application is supposed to be on the whole distributable.
>From the JSR-315:
{quote}
The web.xml resulting from the merge is considered <distributable>
only if all its web fragments are marked as <distributable> as well.
{quote}
Therefore, provided the Seam Security External module can be used in a distributable application, its web-fragment should contain the tag.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months