mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added hashCode(), equals(), toString() in various places. Fixed delete logic.
Added some missing bean references. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5513 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -227,4 +227,43 @@ public class AttributeServiceImpl implements AttributeService
|
||||
}
|
||||
current.put(name, toSave);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.attributes.AttributeService#getKeys(java.lang.String)
|
||||
*/
|
||||
public List<String> getKeys(String path)
|
||||
{
|
||||
if (path == null)
|
||||
{
|
||||
throw new AVMBadArgumentException("Null Attribute Path.");
|
||||
}
|
||||
List<String> keys = parsePath(path);
|
||||
if (keys.size() == 0)
|
||||
{
|
||||
return fGlobalAttributeEntryDAO.getKeys();
|
||||
}
|
||||
GlobalAttributeEntry entry = fGlobalAttributeEntryDAO.get(keys.get(0));
|
||||
if (entry == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Attribute Not Found: " + keys.get(0));
|
||||
}
|
||||
Attribute current = entry.getAttribute();
|
||||
if (current.getType() != Type.MAP)
|
||||
{
|
||||
throw new AVMWrongTypeException("Attribute Not Map: " + keys.get(0));
|
||||
}
|
||||
for (int i = 1; i < keys.size(); i++)
|
||||
{
|
||||
current = current.get(keys.get(i));
|
||||
if (current == null)
|
||||
{
|
||||
throw new AVMNotFoundException("Attribute Not Found: " + keys.get(i));
|
||||
}
|
||||
if (current.getType() != Type.MAP)
|
||||
{
|
||||
throw new AVMWrongTypeException("Attribute Not Map: " + keys.get(i));
|
||||
}
|
||||
}
|
||||
return new ArrayList<String>(current.keySet());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user