Skip to content

Instantly share code, notes, and snippets.

@squeedee
Created October 13, 2011 18:09
Show Gist options
  • Select an option

  • Save squeedee/1284979 to your computer and use it in GitHub Desktop.

Select an option

Save squeedee/1284979 to your computer and use it in GitHub Desktop.
By convention
package userEditorModule.service.user {
import com.visfleet.common.service.FormatEnumeration;
import com.visfleet.common.service.resourceClient.CollectionResource;
import com.visfleet.common.service.vWorkResourceClient.actions.CreateAction;
import com.visfleet.common.service.vWorkResourceClient.actions.DeleteAction;
import com.visfleet.common.service.vWorkResourceClient.actions.NewAction;
import com.visfleet.common.service.vWorkResourceClient.actions.ShowAction;
import com.visfleet.common.service.vWorkResourceClient.actions.UpdateAction;
import flash.events.IEventDispatcher;
import userEditorModule.model.IConfiguration;
public class UsersResource extends CollectionResource {
[Inject]
public var voBuilder:UserVOBuilder;
[Inject]
public var configuration:IConfiguration;
[Inject]
public var context:IEventDispatcher;
[Inject]
public var voSerialiser:UserVOSerialiser;
public var newAction:NewAction;
public var createAction:CreateAction;
public var deleteAction:DeleteAction;
public var updateAction:UpdateAction;
public var showAction:ShowAction;
[PostConstruct]
public function setup():void {
this
.setBaseUri(configuration.serviceRootURL)
.setContext(context)
.setFormat(FormatEnumeration.XML)
.setVOBuilder(voBuilder)
.setVOSerialiser(voSerialiser);
newAction = new NewAction(this);
createAction = new CreateAction(this);
deleteAction = new DeleteAction(this);
updateAction = new UpdateAction(this);
showAction = new ShowAction(this);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment