public Object[] getParentRequiredActivities(String activityId) {
ArrayList parentRequiredActivities = new ArrayList();
Set definedActivities = manager.getDefinedActivityIds();
String currentActivityId = null;
Set activityRequirementBindings = null;
IActivityRequirementBinding currentActivityRequirementBinding = null;
Object[] currentCategoryIds = null;
for (Iterator i = definedActivities.iterator(); i.hasNext();) {
currentActivityId = (String) i.next();
activityRequirementBindings = manager
.getActivity(currentActivityId)
.getActivityRequirementBindings();
for (Iterator j = activityRequirementBindings.iterator(); j
.hasNext();) {
currentActivityRequirementBinding = (IActivityRequirementBinding) j
.next();
if (currentActivityRequirementBinding.getRequiredActivityId()
.equals(activityId)) {
// We found one - add it to the list
currentCategoryIds = getActivityCategories(currentActivityId);
for (int index = 0; index < currentCategoryIds.length; index++) {
parentRequiredActivities