/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/**
* This is the same class as the one in v2/appserv-tests/util/reportbuilder/src/main/java/com/sun/appserv/test.
*
* Please see the original svn logs for the contributions.
*/
public abstract class BaseDevTest {
@SuppressWarnings({"IOResourceOpenedButNotSafelyClosed"})
public BaseDevTest() {
}
return success;
}
return ret.returnValue;
}
/**
* Runs the command with the args given
*
* @param args
*
* @return true if successful
*/
return lastAsadminReturn.returnValue;
}
/**
* Runs the command with the args given
* Returns the precious output strings for further processing.
*
* @param args
*
* @return true if successful
*/
// the tests may be running unattended -- don't wait forever!
int exit;
try {
}
catch (ProcessManagerException ex) {
exit = 1;
}
return ret;
}
return false;
}
}
return true;
}
public boolean isWindows() {
}
try {
try {
}
finally {
}
int index;
}
}
catch (IOException e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage(), e);
}
}
return value;
}
protected final void write() {
if (verbose) {
}
}
if (verbose)
}
protected final void writeFailure() {
if (lastAsadminReturn != null) {
}
}
/**
* Evaluates the Xpath expression
*
* @param expr The expression to evaluate
* @param f The file to parse
* @param ret The return type of the expression can be
*
* XPathConstants.NODESET XPathConstants.BOOLEAN XPathConstants.NUMBER XPathConstants.STRING XPathConstants.NODE
*
* @return the object after evaluation can be of type number maps to a java.lang.Double string maps to a
* java.lang.String boolean maps to a java.lang.Boolean node-set maps to an org.w3c.dom.NodeList
*
* @throws XPathExpressionException
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
try {
return result;
}
catch (Exception e) {
e.printStackTrace();
throw new RuntimeException(e.getMessage(), e);
}
}
/**
* Evaluates the Xpath expression by parsing the DAS's domain.xml
*
* @param expr The Xpath expression to evaluate
*
* @return the object after evaluation can be of type number maps to a java.lang.Double string maps to a
* java.lang.String boolean maps to a java.lang.Boolean node-set maps to an org.w3c.dom.NodeList
*
* @throws XPathExpressionException
* @throws IOException
* @throws SAXException
* @throws ParserConfigurationException
*/
}
/**
* Gets the domains folder for DAS
*
*/
}
/**
* Gets the domain.xml for DAS
*
* @return GF_HOME/domains/domain1/config/domain.xml
*/
}
/**
* Get the Glassfish home from the environment variable S1AS_HOME
*
* @return
*/
throw new IllegalStateException("No S1AS_HOME set!");
}
try {
}
catch (Exception e) {
}
if (!glassFishHome.isDirectory()) {
throw new IllegalStateException("S1AS_HOME is not pointing at a real directory!");
}
return glassFishHome;
}
/**
* Implementations can override this method to do the cleanup for eg deleting instances, deleting clusters etc
*/
public void cleanup() {
}
protected final boolean isVerbose() {
return verbose;
}
protected final void setVerbose(boolean b) {
verbose = b;
}
return lastAsadminReturn;
}
// simple C-struct -- DIY
public static class AsadminReturn {
public boolean returnValue;
}
private boolean verbose = true;
// in case the command fails so that it can be printed (Hack bnevins)
}