return true; StructureContext parentContext = context.getParentContext(); if (parentContext == null) return true;
public boolean determineStructure(StructureContext context) throws DeploymentException { try { VirtualFile file = context.getFile(); // jar structure should already handle top level dirs if (context.isTopLevel() == false && isLeaf(file) == false && isMetadataPath(context) == false) { List<VirtualFile> children = file.getChildren(); if (children != null && children.isEmpty() == false) { VFSStructuralDeployers structuralDeployers = context.getDeployers(); // get top while (context.getParentContext() != null) context = context.getParentContext(); for (VirtualFile child : children) structuralDeployers.determineStructure(child, context); } } return false; } catch (Exception e) { throw DeploymentException.rethrowAsDeploymentException("Error determining structure.", e); } }
/** * Is the current context already part of metadata path. * * @param context the current structure context * @return true if already part of parent's context metadata path */ protected boolean isMetadataPath(StructureContext context) { StructureContext parentContext = context.getParentContext(); if (parentContext == null) return false; StructureMetaData smd = parentContext.getMetaData(); ContextInfo info = smd.getContext(""); List<MetaDataEntry> metadataPaths = info.getMetaDataPath(); if (metadataPaths != null && metadataPaths.isEmpty() == false) { String relativePath = AbstractStructureDeployer.getRelativePath(context.getParent(), context.getFile()); for (MetaDataEntry entry : metadataPaths) if (relativePath.equalsIgnoreCase(entry.getPath())) return true; } return false; } }
if (ignoreRelativePath == false && (structureContext.getParentContext() != null))
if (isSupportsCandidateAnnotations()) StructureContext parentContext = structureContext.getParentContext(); if (parentContext != null && parentContext.isCandidateAnnotationScanning())