Package org.apache.turbine.services.intake.model

Examples of org.apache.turbine.services.intake.model.Group


        }

        public Group setKey(String key, boolean create)
            throws Exception
        {
            Group g = null;

            String inputKey = TurbineIntake.getGroupKey(groupName) + key;
            if ( groups.containsKey(inputKey))
            {
                g = (Group)groups.get(inputKey);
            }
            else if (create)
            {
                g = TurbineIntake.getGroup(groupName);
                groups.put(inputKey, g);
                g.init(key, data);
            }

            return g;
        }
View Full Code Here


       */

        public Group mapTo(Retrievable obj)
            throws Exception
        {
            Group g = null;

            try
            {
                String inputKey = TurbineIntake.getGroupKey(groupName)
                    + obj.getQueryKey();
                if ( groups.containsKey(inputKey))
                {
                    g = (Group)groups.get(inputKey);
                }
                else
                {
                    g = TurbineIntake.getGroup(groupName);
                    groups.put(inputKey, g);
                }
                return g.init(obj);
            }
            catch(Exception e)
            {
                Log.error(e);
            }
View Full Code Here

     * @throws TurbineException if recycling fails.
     */
    public Group getGroup(String groupName)
            throws TurbineException
    {
        Group instance = (Group)pollInstance(groupName);
        if ( instance == null )
        {
            try
            {
                instance = new Group(appData.getGroup(groupName));
            }
            catch (Exception e)
            {
                throw new TurbineException(e);
            }
View Full Code Here

         * @return an instance or null.
         */
        public Group poll()
            throws TurbineException
        {
            Group instance = (Group)pool.poll();
            if ((instance != null) &&
                (instance instanceof Recyclable))
            {
                try
                {
                    ((Recyclable) instance).recycle();
                }
                catch (Exception x)
                {
                    throw new TurbineException("Recycling failed for " +
                        instance.getClass().getName(),x);
                }
            }
            return instance;
        }
View Full Code Here

                if ( foundGroups != null )
                {
                    Iterator iter = foundGroups.iterator();
                    while (iter.hasNext())
                    {
                        Group group = (Group)iter.next();
                        groups.put(group.getObjectKey(), group);
                    }
                }
            }
            catch(Exception e)
            {
View Full Code Here

    {
        boolean allValid = true;
        Iterator iter = groups.values().iterator();
        while (iter.hasNext())
        {
            Group group = (Group)iter.next();
            allValid &= group.isAllValid();
        }
        return allValid;
    }
View Full Code Here

    public void removeAll()
    {
        Object[] allGroups = groups.values().toArray();
        for (int i=allGroups.length-1; i>=0; i-- )
        {
            Group group = (Group)allGroups[i];
            remove(group);
        }
    }
View Full Code Here

    public void dispose()
    {
        Iterator iter = groups.values().iterator();
        while ( iter.hasNext() )
        {
            Group g = (Group)iter.next();
            TurbineIntake.releaseGroup(g);
        }

        groups.clear();
        declaredGroups.clear();
View Full Code Here

        }

        public Group setKey(String key, boolean create)
            throws Exception
        {
            Group g = null;

            String inputKey = TurbineIntake.getGroupKey(groupName) + key;
            if ( groups.containsKey(inputKey))
            {
                g = (Group)groups.get(inputKey);
            }
            else if (create)
            {
                g = TurbineIntake.getGroup(groupName);
                groups.put(inputKey, g);
                g.init(key, data);
            }

            return g;
        }
View Full Code Here

       */

        public Group mapTo(Retrievable obj)
            throws Exception
        {
            Group g = null;

            try
            {
                String inputKey = TurbineIntake.getGroupKey(groupName)
                    + obj.getQueryKey();
                if ( groups.containsKey(inputKey))
                {
                    g = (Group)groups.get(inputKey);
                }
                else
                {
                    g = TurbineIntake.getGroup(groupName);
                    groups.put(inputKey, g);
                }
                return g.init(obj);
            }
            catch(Exception e)
            {
                Log.error(e);
            }
View Full Code Here

TOP

Related Classes of org.apache.turbine.services.intake.model.Group

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.