public VirtualFile getMetaDataFile(String name) { if (name == null) throw new IllegalArgumentException("Null name"); try { // There isn't a metadata locations so let's see whether the root matches. if (metaDataLocations == null || metaDataLocations.isEmpty()) { // It has to be a plain file if (root != null && SecurityActions.isLeaf(root)) { String fileName = root.getName(); if (fileName.equals(name)) return root; } // No match return null; } // Look in the meta data locations return searchMetaDataLocations(name); } catch (Exception e) { if (log.isTraceEnabled()) log.trace("Error retrieving meta data: " + name + " reason=" + e); return null; } }
/** * Create a new StructureDeployerWrapper. * * @param deployer the deployer */ public StructureDeployerWrapper(StructureDeployer deployer) { if (deployer == null) throw new IllegalArgumentException("Null deployer"); this.deployer = deployer; log = Logger.getLogger(deployer.getClass()); this.classLoader = SecurityActions.getContextClassLoader(); }
public boolean determineStructure(StructureContext context) throws DeploymentException { if (context == null) throw new IllegalArgumentException("Null context"); if (context.isCandidateAnnotationScanning() && deployer.isSupportsCandidateAnnotations() == false) return false; ClassLoader previous = SecurityActions.setContextClassLoader(classLoader); try { boolean result = deployer.determineStructure(context); if (log.isTraceEnabled()) { if (result == false) log.trace("Not recognised: " + context.getName()); else log.trace("Recognised: " + context.getName()); } return result; } finally { SecurityActions.resetContextClassLoader(previous); } }
if (root != null && root.exists() && SecurityActions.isLeaf(root))
if (root != null && SecurityActions.isLeaf(root))
if (root != null && SecurityActions.isLeaf(root) && filter.accepts(root))
if (classPathHadVF == false && SecurityActions.isLeaf(file) == false) VFSUtils.addManifestLocations(file, classPath);
if (classPathHadVF == false && SecurityActions.isLeaf(file) == false)