mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/advanced/configuration/SystemMetaTypeMgrImpl.java
private MetaTypeModel tryAddMetaTypeModel(final long bundleId, final String pid, final int controllerId, 
            final boolean isFactory)
    {
        if (isFactory)
        {
            for (MetaTypeModel model: m_MetatypeListFactories.get(controllerId))
            {
                if (model.getPid().equals(pid))
                {
                    return model;
                }
            }
            final MetaTypeModel newModel = new MetaTypeModel(pid, bundleId);
            m_MetatypeListFactories.get(controllerId).add(newModel);
            return newModel;
        }
        
        for (MetaTypeModel model: m_MetatypeListConfigs.get(controllerId))
        {
            if (model.getPid().equals(pid))
            {
                return model;
            }
        }
        final MetaTypeModel newModel = new MetaTypeModel(pid, bundleId);
        m_MetatypeListConfigs.get(controllerId).add(newModel);
        return newModel;
    }
/**
     * Method tries to add a meta type model to the configuration for factories meta type maps. If the model already
     * exists then it just returns the already existent model.
     * 
     * @param bundleId
     *      ID of the bundle the meta type information belongs to.
     * @param pid
     *      PID of the service the meta type information belongs to.
     * @param controllerId
     *      ID of the controller the meta type information is located on.
     * @param isFactory
     *      Boolean used to determine if the meta type information pertains to a factory.
     * @return
     *      The {@link MetaTypeModel} that was created or already existed.
     */
Method tries to add a meta type model to the configuration for factories meta type maps. If the model already
exists then it just returns the already existent model.

@param bundleId
ID of the bundle the meta type information belongs to.
@param pid
PID of the service the meta type information belongs to.
@param controllerId
ID of the controller the meta type information is located on.
@param isFactory
Boolean used to determine if the meta type information pertains to a factory.
@return
The  MetaTypeModel that was created or already existed.
Method tries to add a meta type model to the configuration for factories meta type maps . If the model already exists then it just returns the already existent model . @param bundleId ID of the bundle the meta type information belongs to . @param pid PID of the service the meta type information belongs to . @param controllerId ID of the controller the meta type information is located on . @param isFactory Boolean used to determine if the meta type information pertains to a factory . @return The MetaTypeModel that was created or already existed .
private MetaTypeModel tryAddMetaTypeModel(final long bundleId, final String pid, final int controllerId, 
            final boolean isFactory)
    {
        if (isFactory)
        {
            for (MetaTypeModel model: m_MetatypeListFactories.get(controllerId))
            {
                if (model.getPid().equals(pid))
                {
                    return model;
                }
            }
            final MetaTypeModel newModel = new MetaTypeModel(pid, bundleId);
            m_MetatypeListFactories.get(controllerId).add(newModel);
            return newModel;
        }
        for (MetaTypeModel model: m_MetatypeListConfigs.get(controllerId))
        {
            if (model.getPid().equals(pid))
            {
                return model;
            }
        }
        final MetaTypeModel newModel = new MetaTypeModel(pid, bundleId);
        m_MetatypeListConfigs.get(controllerId).add(newModel);
        return newModel;
    }
private MetaTypeModel tryAddMetaTypeModel ( final long bundleId , final String pid , final int controllerId , final boolean isFactory ) { if ( isFactory ) { for ( MetaTypeModel model : m_MetatypeListFactories . get ( controllerId ) ) { if ( model . getPid ( ) . equals ( pid ) ) { return model ; } } final MetaTypeModel newModel = new MetaTypeModel ( pid , bundleId ) ; m_MetatypeListFactories . get ( controllerId ) . add ( newModel ) ; return newModel ; } for ( MetaTypeModel model : m_MetatypeListConfigs . get ( controllerId ) ) { if ( model . getPid ( ) . equals ( pid ) ) { return model ; } } final MetaTypeModel newModel = new MetaTypeModel ( pid , bundleId ) ; m_MetatypeListConfigs . get ( controllerId ) . add ( newModel ) ; return newModel ; }
Method tries to add a meta type model to the configuration for factories meta type maps.
Method tries to add a meta type model to the configuration for factories meta type maps .