int rowId = remote.addActivity(activityVO, IndividualId);
AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
"com.centraview.administration.authorization.AuthorizationHome", "Authorization");
Authorization authRemote = authHome.create();
authRemote.setDataSource(dataSource);
Vector vectOptional = ((ActivityForm)form).getActivityAttendeeOptionalVector();
Vector vectRequired = ((ActivityForm)form).getActivityAttendeeRequiredVector();
Iterator iterOptional = null;
Iterator iterRequired = null;
int l1 = 0, l2 = 0, arrIndex = 0;
if (vectOptional != null) {
iterOptional = vectOptional.iterator();
l1 = vectOptional.size();
}
if (vectRequired != null) {
iterRequired = vectRequired.iterator();
l2 = vectRequired.size();
}
int arrView[] = new int[l1 + l2];
int arrBlank[] = {};
if (iterRequired != null) {
while (iterRequired.hasNext()) {
DDNameValue nvalue = (DDNameValue)iterRequired.next();
String strID = nvalue.getStrid();
String arrStrings[] = strID.split("#");
strID = arrStrings[0].trim();
int id = Integer.parseInt(strID);
arrView[arrIndex++] = id;
}// end of while (iterRequired.hasNext())
}// end of if (iterRequired != null)
if (iterOptional != null) {
while (iterOptional.hasNext()) {
DDNameValue nvalue = (DDNameValue)iterOptional.next();
String strID = nvalue.getStrid();
String arrStrings[] = strID.split("#");
strID = arrStrings[0].trim();
int id = Integer.parseInt(strID);
arrView[arrIndex++] = id;
}// end of while (iterOptional.hasNext())
}// end of if (iterOptional != null)
request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.EDIT);
String activityVisibility = ((ActivityForm)form).getActivityVisibility();
if (activityVisibility != null && activityVisibility.equals("PRIVATE")) {
authRemote.saveRecordPermission(IndividualId, 0, "Activities", rowId, arrView, arrBlank,
arrBlank);
}
if (activityVisibility != null && activityVisibility.equals("PUBLIC")) {
authRemote.saveRecordPermission(IndividualId, -1, "Activities", rowId, arrView, arrBlank,
arrBlank);
}
}// end of try Block
catch (Exception e) {