}
else if(parName.equals("OLD_NOTES")){
String oldNotest = (String)request.getAttribute("OLD_NOTES");
try {
oldNotes =new String(new BASE64Decoder().decodeBuffer(oldNotest));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
else if(parName.equals("notes")){
notes = (String)request.getAttribute("notes");
}
}
if (objId != null && !objId.equals("")){
if (userId != null && !userId.equals("")){
boolean canSee = false;
BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectById(new Integer(objId));
try {
canSee = ObjectsAccessVerifier.canSee(obj, profile2);
} catch (EMFInternalError e1) {
e1.printStackTrace();
}
if (!canSee) {
logger.error("Object with label = '" + obj.getLabel()
+ "' cannot be executed by the user!!");
Vector v = new Vector();
v.add(obj.getLabel());
throw new EMFUserError(EMFErrorSeverity.ERROR, "1075", v, null);
}
// get all correct execution roles
List correctRoles = new ArrayList();
try {
correctRoles = DAOFactory.getBIObjectDAO().getCorrectRolesForExecution(new Integer(objId), profile2);
} catch (NumberFormatException e2) {
e2.printStackTrace();
}
if (correctRoles == null || correctRoles.size() == 0) {
logger.warn("Object cannot be executed by no role of the user");
throw new EMFUserError(EMFErrorSeverity.ERROR, 1006);
}
String tempOldNotest = getNotes(execIdentifier, objId );
String tempOldNotes = "" ;
try {
tempOldNotes =new String(new BASE64Decoder().decodeBuffer(tempOldNotest));
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}