Package org.apache.commons.collections.map

Examples of org.apache.commons.collections.map.ListOrderedMap$2


        UserImpl u = (UserImpl) uMgr.createUser("z", "z");
        // remember the z-folder for later removal
        toRemove.add((NodeImpl) u.getNode().getParent().getParent());
        assertEquals(UserConstants.USERS_PATH + "/z/zz/z", u.getNode().getPath());

        Map<String, String> m = new ListOrderedMap();
        // potential conflicting uid
        m.put("zzz", "/z/zz/zzz/zzz");
        // max-size (2) is reached
        m.put("zzzuerich", "/z/zz/zzz/zzzuerich");
        m.put("zzuerich", "/z/zz/zzu/zzuerich");
        // too short for expanded folders
        m.put("zz", "/z/zz/zz");

        for (String uid : m.keySet()) {
            u = (UserImpl) uMgr.createUser(uid, uid);
            assertEquals(UserConstants.USERS_PATH + m.get(uid), u.getNode().getPath());

            User us = (User) uMgr.getAuthorizable(uid);
            assertNotNull(us);
            assertEquals(uid, us.getID());
        }
View Full Code Here


    }

    @Override
    protected Map copyMap(Map map) {
        if (map instanceof ListOrderedMap || map.getClass().getName().equals(ListOrderedMap.class.getName())) {
            Map newMap = new ListOrderedMap();
            newMap.putAll(map);
            return newMap;
        } else if (map instanceof SequencedHashMap || map.getClass().getName().equals(SequencedHashMap.class.getName())) {
            Map newMap = new SequencedHashMap();
            newMap.putAll(map);
            return newMap;
        } else {
            return super.copyMap(map);
        }
    }
View Full Code Here

     * Return a Map of value=label, each pair representing a grid column header.
     * @param formData
     * @return
     */
    protected Map<String, String> getHeaderMap(FormData formData) {
        Map<String, String> headerMap = new ListOrderedMap();
        Object optionProperty = getProperty(FormUtil.PROPERTY_OPTIONS);
        if (optionProperty != null && optionProperty instanceof Collection) {
            for (Map opt : (FormRowSet) optionProperty) {
                Object value = opt.get("value");
                Object label = opt.get("label");
                if (value != null && label != null) {
                    headerMap.put(value.toString(), label.toString());
                }
            }
        }
        return headerMap;
    }
View Full Code Here

    private class Entries {

        private final ListOrderedMap principalNamesToEntries;

        private Entries(NodeImpl node, Collection principalNames) throws RepositoryException {
            principalNamesToEntries = new ListOrderedMap();
            for (Iterator it = principalNames.iterator(); it.hasNext();) {
                principalNamesToEntries.put(it.next(), new ArrayList());
            }
            collectEntries(node);
        }
View Full Code Here

                    int numberOfColumns,
                    DatabaseMap containingDB)
    {
        this.tableName = tableName;
        dbMap = containingDB;
        columns = Collections.synchronizedMap(new ListOrderedMap());
    }
View Full Code Here

     */
    public TableMap(String tableName, DatabaseMap containingDB)
    {
        this.tableName = tableName;
        dbMap = containingDB;
        columns = Collections.synchronizedMap(new ListOrderedMap());
    }
View Full Code Here

                    DatabaseMap containingDB)
    {
        this.tableName = tableName;
        this.prefix = prefix;
        dbMap = containingDB;
        columns = Collections.synchronizedMap(new ListOrderedMap());
    }
View Full Code Here

    /**
     * Constructs a new DatabaseMap.
     */
    public DatabaseMap()
    {
        tables = Collections.synchronizedMap(new ListOrderedMap());
        idGenerators = new HashMap(ID_GENERATORS_INITIAL_SIZE);
    }
View Full Code Here

     *             in a future version of Torque.
     */
    public DatabaseMap(String name, int numberOfTables)
    {
        this.name = name;
        tables = Collections.synchronizedMap(new ListOrderedMap());
        idGenerators = new HashMap(ID_GENERATORS_INITIAL_SIZE);
    }
View Full Code Here

     *             in a future version of Torque.
     */
    public DatabaseMap(String name)
    {
        this.name = name;
        tables = Collections.synchronizedMap(new ListOrderedMap());
        idGenerators = new HashMap(ID_GENERATORS_INITIAL_SIZE);
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.collections.map.ListOrderedMap$2

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.