/** * Build a jar visitor from its jar string path */ private AbstractJarVisitor(String jarPath) { this.jarUrl = JarVisitorFactory.getURLFromPath( jarPath ); unqualify(); }
public String getUnqualifiedJarName(URL jarToScan) { JarVisitor jarVisitor = getVisitor( jarToScan ); return jarVisitor.getUnqualifiedJarName(); }
/** * Macro to get the content of a unique child element. * * @param element The parent element. * @param tagName The name of the desired child. * @return The element content or null. */ public static String getUniqueChildContent( Element element, String tagName) throws Exception { return getElementContent( getUniqueChild( element, tagName ) ); }
/** * Macro to get the content of an optional child element. * * @param element The parent element. * @param tagName The name of the desired child. * @return The element content or null. */ public static String getOptionalChildContent( Element element, String tagName) throws Exception { return getElementContent( getOptionalChild( element, tagName ) ); }
private JarVisitor getMainJarVisitor(URL url, PersistenceMetadata metadata, Map integration) { URL jarURL = JarVisitorFactory.getJarURLFromURLEntry( url, "/META-INF/persistence.xml" ); Filter[] persistenceXmlFilter = getFilters( metadata, integration, metadata.getExcludeUnlistedClasses() ); return JarVisitorFactory.getVisitor( jarURL, persistenceXmlFilter ); }
/** * Get the content of the given element. * * @param element The element to get the content for. * @return The content of the element or null. */ public static String getElementContent(final Element element) throws Exception { return getElementContent( element, null ); }
/** * Method used by JBoss AS 4.0.5 for parsing */ public static List<PersistenceMetadata> deploy(URL url, Map overrides, EntityResolver resolver) throws Exception { return deploy(url, overrides, resolver, PersistenceUnitTransactionType.JTA); }
public PersistenceUnitMetaData(PersistenceUnitsMetaData parent, PersistenceMetadata old) { assert parent != null : "parent is null"; assert old != null : "old is null"; this.parent = parent; this.delegate = old; this.name = old.getName(); }
/** * Gets the child of the specified element having the * specified name. If the child with this name doesn't exist * then null is returned instead. * * @param element the parent element * @param tagName the name of the desired child * @return either the named child or null */ public static Element getOptionalChild(Element element, String tagName) throws Exception { return getOptionalChild( element, tagName, null ); }
protected AbstractJarVisitor(String fileName, Filter[] filters) { this( fileName ); initFilters( filters ); }
/** * Build a JarVisitor on the given JAR URL applying the given filters * * @throws IllegalArgumentException if the URL is malformed */ public static JarVisitor getVisitor(URL jarUrl, Filter[] filters) throws IllegalArgumentException { return getVisitor( jarUrl, filters, "" ); }
private AbstractJarVisitor(URL url) { jarUrl = url; unqualify(); }
protected JarVisitor(String fileName, Filter[] filters) { this( fileName ); initFilters( filters ); }
/** * Get the content of the given element. * * @param element The element to get the content for. * @return The content of the element or null. */ public static String getElementContent(final Element element) throws Exception { return getElementContent( element, null ); }
/** * Method used by JBoss AS 4.0.5 for parsing */ public static List<PersistenceMetadata> deploy(URL url, Map overrides, EntityResolver resolver) throws Exception { return deploy(url, overrides, resolver, PersistenceUnitTransactionType.JTA); }
protected AbstractJarVisitor(URL url, Filter[] filters) { this( url ); initFilters( filters ); }
/** * Build a JarVisitor on the given JAR URL applying the given filters * * @throws IllegalArgumentException if the URL is malformed */ public static JarVisitor getVisitor(URL jarUrl, Filter[] filters) throws IllegalArgumentException { return getVisitor( jarUrl, filters, "" ); }
private AbstractJarVisitor(URL url) { jarUrl = url; unqualify(); }
/** * Get the content of the given element. * * @param element The element to get the content for. * @return The content of the element or null. */ public static String getElementContent(final Element element) throws Exception { return getElementContent( element, null ); }
protected AbstractJarVisitor(String fileName, Filter[] filters) { this( fileName ); initFilters( filters ); }