private void initPropertyBundle ( ) throws CmsLoaderException , CmsException , IOException { for ( Locale l : m_locales ) { String filePath = m_sitepath + m_basename + "_" + l . toString ( ) ; CmsResource resource = null ; if ( m_cms . existsResource ( filePath , CmsResourceFilter . requireType ( OpenCms . getResourceManager ( ) . getResourceType ( BundleType . PROPERTY . toString ( ) ) ) ) ) { resource = m_cms . readResource ( filePath ) ; SortedProperties props = new SortedProperties ( ) ; CmsFile file = m_cms . readFile ( resource ) ; props . load ( new InputStreamReader ( new ByteArrayInputStream ( file . getContents ( ) ) , CmsFileUtil . getEncoding ( m_cms , file ) ) ) ; m_keyset . updateKeySet ( null , props . keySet ( ) ) ; m_bundleFiles . put ( l , resource ) ; } } }
Initialization necessary for editing a property bundle .