@Override public VFSDeploymentResourceLoader getResourceLoader() { if (loader != null) return loader; loader = new VFSDeploymentResourceLoaderImpl(getRoot()); return loader; }
/** * Create a new VFSStructurealDeployers. * * @param structureDeployers the given deployers * @throws IllegalArgumentException for null deployers */ public VFSStructuralDeployersImpl(Set<StructureDeployer> structureDeployers) { setDeployers(structureDeployers); }
/** * Search the metadata locations. * In this impl the first one matching is returned. * * @param name the file name to find * @return found file or null if not found */ protected VirtualFile searchMetaDataLocations(String name) { return searchMetaDataLocations(name, MetaDataTypeFilter.DEFAULT); }
public List<VirtualFile> getMetaDataFiles(String name, String suffix, MetaDataTypeFilter mdtf) { if (name == null && suffix == null) throw new IllegalArgumentException("Null name and suffix"); VirtualFileFilter filter = new MetaDataMatchFilter(name, suffix); return getMetaDataFiles(filter, mdtf); }
protected DeploymentUnit createDeploymentUnit() { return new AbstractVFSDeploymentUnit(this); }
/** * Create a new AbstractVFSDeploymentContext. * * @param root the virtual file * @param relativePath the relative path */ public AbstractVFSDeploymentContext(VirtualFile root, String relativePath) { super(safeVirtualFileName(root), root.getName(), relativePath); this.root = root; }
@Override public VFSDeploymentResourceLoader getResourceLoader() { return getDeploymentContext().getResourceLoader(); }
public List<VirtualFile> getMetaDataLocations() { return getMetaDataLocations(MetaDataTypeFilter.DEFAULT); }
public List<VirtualFile> getMetaDataFiles(String name, String suffix) { return getMetaDataFiles(name, suffix, MetaDataTypeFilter.DEFAULT); }
public VirtualFile getMetaDataFile(String name) { return getMetaDataFile(name, MetaDataTypeFilter.DEFAULT); }
/** * Determine whether the {@link VirtualFile} has a name that matches this structure. * Defaults to just checking the suffix. * * @param root the {@link VirtualFile} root to check * @return true if the file name is valid for this {@link StructureDeployer} */ protected boolean hasValidName(VirtualFile root) { return hasValidSuffix(root.getName()); }
/** * Determine whether to mount the archive. * * @param virtualFile to check * @return true if the {@link VirtualFile} should be mounted */ protected boolean shouldMount(VirtualFile virtualFile) { return virtualFile.isFile() && hasValidName(virtualFile); }
@Override public VFSDeploymentResourceLoader getResourceLoader() { if (loader != null) return loader; loader = new VFSDeploymentResourceLoaderImpl(getRoot()); return loader; }
/** * Create a new VFSStructurealDeployers. * * @param structureDeployers the given deployers * @throws IllegalArgumentException for null deployers */ public VFSStructuralDeployersImpl(Set<StructureDeployer> structureDeployers) { setDeployers(structureDeployers); }
protected DeploymentUnit createDeploymentUnit() { return new AbstractVFSDeploymentUnit(this); }
/** * Create a new AbstractVFSDeploymentContext. * * @param root the virtual file * @param relativePath the relative path */ public AbstractVFSDeploymentContext(VirtualFile root, String relativePath) { super(safeVirtualFileName(root), root.getName(), relativePath); this.root = root; }
@Override public VFSDeploymentResourceLoader getResourceLoader() { return getDeploymentContext().getResourceLoader(); }
public List<VirtualFile> getMetaDataFiles(VirtualFileFilter filter) { return getMetaDataFiles(filter, MetaDataTypeFilter.DEFAULT); }