ccc.client.actions
Class ResourceNameExistsAction

java.lang.Object
  extended by ccc.client.core.RemotingAction
      extended by ccc.client.actions.ResourceNameExistsAction
All Implemented Interfaces:
Action

public abstract class ResourceNameExistsAction
extends RemotingAction

Check that a resource name exists.

Author:
Civic Computing Ltd.

Field Summary
 
Fields inherited from interface ccc.client.core.Action
UI_CONSTANTS, USER_ACTIONS
 
Constructor Summary
ResourceNameExistsAction(ResourceSummary folder, ResourceName resourceName)
          Constructor.
 
Method Summary
protected abstract  void execute(boolean nameExists)
          Handle a successful execution.
protected  java.lang.String getPath()
          Determine the server path for this action.
protected  void onOK(Response response)
          Handle a '200 OK' response from the remote server.
 
Methods inherited from class ccc.client.core.RemotingAction
beforeExecute, encode, execute, fireEvent, getActionName, getBody, getParser, getRequest, onFailure, onNoContent, parseResourceSummary, setExecutor, setParser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceNameExistsAction

public ResourceNameExistsAction(ResourceSummary folder,
                                ResourceName resourceName)
Constructor.

Parameters:
resourceName - The resource name to check.
folder - The folder to check.
Method Detail

getPath

protected java.lang.String getPath()
Determine the server path for this action.

Overrides:
getPath in class RemotingAction
Returns:
The server path for the resource.

onOK

protected void onOK(Response response)
Handle a '200 OK' response from the remote server.

Overrides:
onOK in class RemotingAction
Parameters:
response - The server response.

execute

protected abstract void execute(boolean nameExists)
Handle a successful execution.

Parameters:
nameExists - True if the resource name exists, false otherwise.


Copyright © 2010. All Rights Reserved.