mil.dod.th.ose.core/src/mil/dod/th/ose/core/impl/mp/TemplateProgramManagerImpl.java
private MissionProgramTemplate findTemplate(final String name)
    {
        UUID foundUUID = null;
        synchronized (m_Templates)
        {
            for (Entry<String, UUID> template : m_Templates.entrySet())
            {
                //if the name matches pull out the uuid
                if (template.getKey().equalsIgnoreCase(name))
                {
                    foundUUID = template.getValue();
                }
            }
        }
        //if the uuid is still null then return null, the null is caught in the receiving method
        if (foundUUID == null)
        {
            return null;
        }
        //use the uuid of the template to query the data store
        final PersistentData persistTemp = m_PersistentDataStore.find(foundUUID);
        final byte[] serTemplate = (byte[])persistTemp.getEntity();
        return (MissionProgramTemplate)XmlUtils.fromXML(serTemplate, MissionProgramTemplate.class);
    }
/**
     * Finds an individual template within the template manager.
     * 
     * @param name
     *     the name of the template to find
     * @return
     *     mission program template with the matching name passed
     */
Finds an individual template within the template manager.

@param name
the name of the template to find
@return
mission program template with the matching name passed
Finds an individual template within the template manager . @param name the name of the template to find @return mission program template with the matching name passed
private MissionProgramTemplate findTemplate(final String name)
    {
        UUID foundUUID = null;
        synchronized (m_Templates)
        {
            for (Entry<String, UUID> template : m_Templates.entrySet())
            {
                if (template.getKey().equalsIgnoreCase(name))
                {
                    foundUUID = template.getValue();
                }
            }
        }
        if (foundUUID == null)
        {
            return null;
        }
        final PersistentData persistTemp = m_PersistentDataStore.find(foundUUID);
        final byte[] serTemplate = (byte[])persistTemp.getEntity();
        return (MissionProgramTemplate)XmlUtils.fromXML(serTemplate, MissionProgramTemplate.class);
    }
private MissionProgramTemplate findTemplate ( final String name ) { UUID foundUUID = null ; synchronized ( m_Templates ) { for ( Entry < String , UUID > template : m_Templates . entrySet ( ) ) { if ( template . getKey ( ) . equalsIgnoreCase ( name ) ) { foundUUID = template . getValue ( ) ; } } } if ( foundUUID == null ) { return null ; } final PersistentData persistTemp = m_PersistentDataStore . find ( foundUUID ) ; final byte [ ] serTemplate = ( byte [ ] ) persistTemp . getEntity ( ) ; return ( MissionProgramTemplate ) XmlUtils . fromXML ( serTemplate , MissionProgramTemplate . class ) ; }
Finds an individual template within the template manager.
Finds an individual template within the template manager .
//if the name matches pull out the uuid //if the uuid is still null then return null, the null is caught in the receiving method //use the uuid of the template to query the data store