/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2008 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: PatchCommandExecutor.java,v 1.1 2008/11/22 02:24:32 ak138937 Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
public PatchCommandExecutor() {
try {
runPatchCmd();
"PatchCommandExecutor.PatchCommandExecutor: " +
"Exception in executing patch command", ex);
}
}
cmdList = executePatchCmd();
delimiter = ",";
}
return retList;
}
return retList;
}
) {
if (indxSrch == -1) {
return "";
}
return "";
}
while (stok.hasMoreTokens()) {
break;
}
}
return resultStr;
}
/**
* Returns the list of all patches on the system
*
* @return list of patches.
*/
return cmdList;
}
/**
* Returns a patch from given entry
*
* @param patch the patch entry
* @param token the pattern to retrieve from patch entry
* @return patch from the given patch entry.
*/
// iterate over the patch output and get the PatchId
}
/**
* Returns a list of patches present on the system
*
* @return list of patches present on system
*/
// iterate over the cmdList and get the PatchIds
// which are present
}
}
return present;
}
/**
* Returns a list of patches obsoleted by current patch on system
*
* @return list of obsolete patches
*/
delimiter=",";
// iterate over the cmdList and get the PatchIds
// which are obsoleted
// pass delimiter as applicable
}
}
}
if (arrayOfObsoletes.isEmpty()) {
return arrayOfObsoletes;
}
return cleanedList;
}
/**
* Returns a list of patches required on the system
*
* @return list of patches required
*/
// iterate over the cmdList and get the PatchIds
// which are required
}
}
return requires;
}
/**
* Returns a list of patches that are incompatible on the system
*
* @return list of incompatible patches
*/
// iterate over the cmdList and get the PatchIds
// which are incompatible
}
}
return incompatible;
}
/**
* Returns a list of packages on the system
*
* @return list of packages
*/
// iterate over the cmdList and get the PatchIds
// which are composed of the packages
}
}
return dependPackage;
}
/**
* Returns the hashmap with the hashmap containing with
* key having incompatibles patchids and value having
* corresponding id of the patch which obsoleted it.
*
* @return Map of incompatible patch and its obsoleted patch
*/
delimiter=",";
//iterate over the cmdList and get the PatchIds which
//are incompatible with some already installed patch
} else {
}
}
}
}
return incompats;
}
}