@NotNull public ConfigFileMetaData[] getMetaData() { if (myCachedMetaData == null) { myCachedMetaData = myMetaData.toArray(new ConfigFileMetaData[myMetaData.size()]); } return myCachedMetaData; }
public void registerMetaData(@NotNull final ConfigFileMetaData... metaData) { for (ConfigFileMetaData data : metaData) { myMetaData.add(data); myId2MetaData.put(data.getId(), data); } myCachedMetaData = null; }
@Nullable public static Element findContextInContextXmlByFacet(TomcatDeploymentModelBase tomcatModel) { Artifact artifact = tomcatModel.getArtifact(); if(artifact != null) { JavaeeDescriptor contextDescriptor = TomcatIntegration.getInstance().getDescriptorsManager().getItem(TomcatContextRoot.class); ConfigFileMetaData metaData = contextDescriptor.getMetaData(); for(JavaEEModuleExtension facet : JavaeeArtifactUtil.getInstance().getFacetsIncludedInArtifact(tomcatModel.getCommonModel().getProject(), artifact, JavaWebModuleExtension.class)) { ConfigFile configFile = facet.getDescriptorsContainer().getConfigFile(metaData); try { if(configFile != null) { VirtualFile contextXmlFile = configFile.getVirtualFile(); if(contextXmlFile != null) { Document contextDocument = loadXMLFile(VfsUtilCore.virtualToIoFile(contextXmlFile)); return contextDocument.getRootElement(); } } } catch(ExecutionException e) { LOG.info(e); } } } return null; }
public ConfigFileMetaDataRegistryImpl(ConfigFileMetaData[] metaDatas) { for (ConfigFileMetaData metaData : metaDatas) { registerMetaData(metaData); } }
@Nullable public ConfigFileMetaData findMetaData(@NonNls @NotNull final String id) { return myId2MetaData.get(id); }
@Override @NotNull public ConfigFileMetaData getMetaData() { return myInfo.getMetaData(); }
@NotNull Collection<ConfigFileMetaData> getMetaData(AppServerIntegration integration);
public ConfigFileMetaData getMetaData() { return meta; }
@Override public ConfigFileMetaDataProvider createMetaDataProvider(final ConfigFileMetaData... metaDatas) { return new ConfigFileMetaDataRegistryImpl(metaDatas); }
@Override public ConfigFileContainer createSingleFileContainer(Project project, ConfigFileMetaData metaData) { final ConfigFileMetaDataProvider metaDataProvider = createMetaDataProvider(metaData); return createConfigFileContainer(project, metaDataProvider, createConfigFileInfoSet(metaDataProvider)); }
void register(@NotNull Class<? extends JavaEEModuleExtension> facetTypeId, @Nullable AppServerIntegration appServer, @NotNull ConfigFileMetaData metaData);
void registerMetaData(AppServerIntegration integration, ConfigFileMetaData metaData);