getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA," Error renaming hard token profile  " + oldname +  " to " + newname + "." );
getLogSession().log(admin, admin.getCaId(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA," Error renaming hard token profile  " + oldname +  " to " + newname + "." );
	public void renameHardTokenProfile(Admin admin, String oldname, String newname) throws HardTokenProfileExistsException{	   debug(">renameHardTokenProfile(from " + oldname + " to " + newname + ")");	   boolean success = false;	   try{		  hardtokenprofilehome.findByName(newname);	   }catch(FinderException e){		  try{			 HardTokenProfileDataLocal htp = hardtokenprofilehome.findByName(oldname);			 htp.setName(newname);			 success = true;		  }catch(FinderException g){}	   }	   if(success)		 getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_INFO_HARDTOKENPROFILEDATA,"Hard token profile " + oldname + " renamed to " + newname +  "." );	   else		 getLogSession().log(admin, admin.getCAId(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),null, null, LogEntry.EVENT_ERROR_HARDTOKENPROFILEDATA," Error renaming hard token profile  " + oldname +  " to " + newname + "." );       if(!success)	     throw new HardTokenProfileExistsException();	   debug("<renameHardTokenProfile()");	} // renameHardTokenProfile