Sha256: 3ce8580999ce0d138254f30933609566d6dd865594578be155178905d1788f8b

Contents?: true

Size: 687 Bytes

Versions: 4

Compression:

Stored size: 687 Bytes

Contents

//
//  UpdateUserCommand.h
//  PureMVC_ObjectiveC
//
//  PureMVC Port to ObjectiveC by Brian Knorr <brian.knorr@puremvc.org>
//  PureMVC - Copyright(c) 2006-2008 Futurescale, Inc., Some rights reserved.
//

#import "UpdateUserCommand.h"
#import "ApplicationFacade.h"
#import "UserProxy.h"
#import "UserVO.h"

@implementation UpdateUserCommand

-(void)execute:(id<INotification>)notification {
	UserProxy *userProxy = (UserProxy *)[facade retrieveProxy:[UserProxy NAME]];
	UserVO *userVO = [notification body];
	if ([userVO isValid]) {
		[userProxy update:userVO];
		[facade sendNotification:ShowUserList];
	} else {
		[facade sendNotification:ShowError body:@"Invalid User"];
	}
}

@end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appjam-0.1.0.pre11 lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.m.tt
appjam-0.1.0.pre9 lib/appjam/generators/project/Classes/contacts/controller/UpdateUserCommand.m.tt
appjam-0.1.0.pre6 lib/appjam/generators/project/Classes/users/controller/UpdateUserCommand.m.tt
appjam-0.1.0.pre4 lib/appjam/generators/Classes/users/controller/UpdateUserCommand.m.tt