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

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


     * @throws IntakeException if recycling fails.
     */
    public Group getGroup(String groupName)
            throws IntakeException
    {
        Group group = null;

        AppData appData = (AppData) groupNames.get(groupName);

        if (groupName == null)
        {
View Full Code Here


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

    public void addGroupsToParameters(ValueParser vp)
    {
        for (Iterator i = groups.values().iterator(); i.hasNext();)
        {
            Group group = (Group) i.next();
            if (!declaredGroups.containsKey(group.getIntakeGroupName()))
            {
                declaredGroups.put(group.getIntakeGroupName(), null);
                vp.add("intake-grp", group.getGID());
            }
            vp.add(group.getGID(), group.getOID());
        }
        declaredGroups.clear();
    }
View Full Code Here

    public boolean isAllValid()
    {
        boolean allValid = true;
        for (Iterator iter = groups.values().iterator(); 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()
    {
        for (Iterator iter = groups.values().iterator(); iter.hasNext();)
        {
            Group g = (Group) iter.next();

            try
            {
                TurbineIntake.releaseGroup(g);
            }
            catch (TurbineException se)
            {
                log.error("Tried to release unknown group "
                        + g.getIntakeGroupName());
            }
        }

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

         * @throws IntakeException
         */
        public Group setKey(String key, boolean create)
                throws IntakeException
        {
            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, pp);
            }

            return g;
        }
View Full Code Here

         * @return an Intake Group
         */
        public Group mapTo(Retrievable obj)
                throws IntakeException
        {
            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

         * @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

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.