You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Aidan O'Loan (JIRA)" <ji...@apache.org> on 2008/01/23 00:00:39 UTC
[jira] Created: (JCR-1339) ManageableCollectionUtil doesn't support
Maps
ManageableCollectionUtil doesn't support Maps
---------------------------------------------
Key: JCR-1339
URL: https://issues.apache.org/jira/browse/JCR-1339
Project: Jackrabbit
Issue Type: Bug
Components: jackrabbit-ocm
Affects Versions: 1.4
Reporter: Aidan O'Loan
ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
if (object instanceof Map){
return new ManagedHashMap((Map)object);
}
An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1339) ManageableCollectionUtil doesn't
support Maps
Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587349#action_12587349 ]
Christophe Lombart commented on JCR-1339:
-----------------------------------------
This patch is not suffisiant because there is a bug in ManagedHashMap. The method addObject uses the Object for the key and for the value.
We have to find a solution to set correctly the key.
> ManageableCollectionUtil doesn't support Maps
> ---------------------------------------------
>
> Key: JCR-1339
> URL: https://issues.apache.org/jira/browse/JCR-1339
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-ocm
> Affects Versions: 1.4
> Reporter: Aidan O'Loan
> Assignee: Christophe Lombart
> Attachments: ManageableCollectionUtil_JCR-1339.txt
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
> ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
> if (object instanceof Map){
> return new ManagedHashMap((Map)object);
> }
> An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (JCR-1339) ManageableCollectionUtil doesn't
support Maps
Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587767#action_12587767 ]
Christophe Lombart commented on JCR-1339:
-----------------------------------------
I just commited a better support for the Map, there are 2 ways to define a Map attributes :
Class A
{
// For unparametrized Map, it is mandatory to define the elementClassName
@Collection (elementClassName=Element.class) Map map1;
// For parametized Map, the elementClassName is not necessay
@Collection private Map<String, MyClass> map2;
}
Furthermore, The class ManageableMap is used only internally by the OCM framework.
> ManageableCollectionUtil doesn't support Maps
> ---------------------------------------------
>
> Key: JCR-1339
> URL: https://issues.apache.org/jira/browse/JCR-1339
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-ocm
> Affects Versions: 1.4
> Reporter: Aidan O'Loan
> Assignee: Christophe Lombart
> Fix For: 1.5
>
> Attachments: ManageableCollectionUtil_JCR-1339.txt
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
> ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
> if (object instanceof Map){
> return new ManagedHashMap((Map)object);
> }
> An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (JCR-1339) ManageableCollectionUtil doesn't support
Maps
Posted by "Aidan O'Loan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aidan O'Loan updated JCR-1339:
------------------------------
Attachment: ManageableCollectionUtil_JCR-1339.txt
Proposed patch to support ManagedHashMap
> ManageableCollectionUtil doesn't support Maps
> ---------------------------------------------
>
> Key: JCR-1339
> URL: https://issues.apache.org/jira/browse/JCR-1339
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-ocm
> Affects Versions: 1.4
> Reporter: Aidan O'Loan
> Attachments: ManageableCollectionUtil_JCR-1339.txt
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
> ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
> if (object instanceof Map){
> return new ManagedHashMap((Map)object);
> }
> An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (JCR-1339) ManageableCollectionUtil doesn't
support Maps
Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christophe Lombart resolved JCR-1339.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5
Can you check if it is ok for you ?
> ManageableCollectionUtil doesn't support Maps
> ---------------------------------------------
>
> Key: JCR-1339
> URL: https://issues.apache.org/jira/browse/JCR-1339
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-ocm
> Affects Versions: 1.4
> Reporter: Aidan O'Loan
> Assignee: Christophe Lombart
> Fix For: 1.5
>
> Attachments: ManageableCollectionUtil_JCR-1339.txt
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
> ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
> if (object instanceof Map){
> return new ManagedHashMap((Map)object);
> }
> An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (JCR-1339) ManageableCollectionUtil doesn't
support Maps
Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/JCR-1339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Christophe Lombart reassigned JCR-1339:
---------------------------------------
Assignee: Christophe Lombart
> ManageableCollectionUtil doesn't support Maps
> ---------------------------------------------
>
> Key: JCR-1339
> URL: https://issues.apache.org/jira/browse/JCR-1339
> Project: Jackrabbit
> Issue Type: Bug
> Components: jackrabbit-ocm
> Affects Versions: 1.4
> Reporter: Aidan O'Loan
> Assignee: Christophe Lombart
> Attachments: ManageableCollectionUtil_JCR-1339.txt
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> ManageableCollectionUtil has two getManageableCollection methods, which do not currently return a ManageableCollection which wraps Maps.
> ManagedHashMap already exists in the codebase which I assume was created for this purpose, so both getManageableCollection methods could be modified so that they do something like:
> if (object instanceof Map){
> return new ManagedHashMap((Map)object);
> }
> An alternative solution might be to modify the JCR mapping to support explicitly defining the 'ManagedXXX' class.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.