src/org/ohmage/request/accessrequest/AccessRequestUpdateRequest.java
@Override
	public void service() {
		LOGGER.info("Servicing the AccessRequestUpdateRequest.");
		
		if(! authenticate(AllowNewAccount.NEW_ACCOUNT_DISALLOWED)) {
			return;
		}
	
		try {

			LOGGER.info("Update the AccessRequest.");
			
			String requester = this.getUser().getUsername();
			AccessRequestServices.instance().updateAccessRequest(requester, uuid, emailAddress, 
					requestContent, requestType, requestStatus, notifyUser);
					
			
			// if successful, send an email notification
			if (notifyUser == true) {
				LOGGER.info("Sending notification to user.");
				AccessRequestServices.instance().sendNotification(requester, uuid, false); 
			} else {
				LOGGER.info("Will not notify user since notifyUser = " + notifyUser.toString());	
			}

		}
		catch(ServiceException e) {
			e.failRequest(this);
			e.logException(LOGGER);
		}
	}
/**
	 * Services this request if an existing user is making the request.
	 */
Services this request if an existing user is making the request.
Services this request if an existing user is making the request .
@Override
	public void service() {
		LOGGER.info("Servicing the AccessRequestUpdateRequest.");
		if(! authenticate(AllowNewAccount.NEW_ACCOUNT_DISALLOWED)) {
			return;
		}
		try {
			LOGGER.info("Update the AccessRequest.");
			String requester = this.getUser().getUsername();
			AccessRequestServices.instance().updateAccessRequest(requester, uuid, emailAddress, 
					requestContent, requestType, requestStatus, notifyUser);
			if (notifyUser == true) {
				LOGGER.info("Sending notification to user.");
				AccessRequestServices.instance().sendNotification(requester, uuid, false); 
			} else {
				LOGGER.info("Will not notify user since notifyUser = " + notifyUser.toString());	
			}
		}
		catch(ServiceException e) {
			e.failRequest(this);
			e.logException(LOGGER);
		}
	}
@ Override public void service ( ) { LOGGER . info ( "Servicing the AccessRequestUpdateRequest." ) ; if ( ! authenticate ( AllowNewAccount . NEW_ACCOUNT_DISALLOWED ) ) { return ; } try { LOGGER . info ( "Update the AccessRequest." ) ; String requester = this . getUser ( ) . getUsername ( ) ; AccessRequestServices . instance ( ) . updateAccessRequest ( requester , uuid , emailAddress , requestContent , requestType , requestStatus , notifyUser ) ; if ( notifyUser == true ) { LOGGER . info ( "Sending notification to user." ) ; AccessRequestServices . instance ( ) . sendNotification ( requester , uuid , false ) ; } else { LOGGER . info ( "Will not notify user since notifyUser = " + notifyUser . toString ( ) ) ; } } catch ( ServiceException e ) { e . failRequest ( this ) ; e . logException ( LOGGER ) ; } }
Services this request if an existing user is making the request.
Services this request if an existing user is making the request .
// if successful, send an email notification