Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


oracle.ide.cmd
Class AddContentCommand

java.lang.Object
  extended by oracle.ide.controller.Command
      extended by oracle.ide.cmd.AddContentCommand


public class AddContentCommand
extends Command

The AddContentCommand class implements adding content to a project.

See Also:
Command

Field Summary
static int ADD_TO_PROJECT_CMD_ID
           
static int ADD_URL_TO_PROJECT_CMD_ID
           
static int FAILED
          Indicates that the command failed because content could not be added to the content set.

 

Fields inherited from class oracle.ide.controller.Command
CANCEL, context, EXECUTING, MULTI_NODE, NO_CHANGE, NO_UNDO, NORMAL, OK, type

 

Constructor Summary
AddContentCommand()
          Creates the AddContentCommand.

 

Method Summary
static void addToProject(Context context, java.lang.String contentSetKey)
          Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)
static void addToProject(Node[] nodes, Project project, java.lang.String contentSetKey)
          Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)
static void addToProject(Node node, Project project, java.lang.String contentSetKey)
          Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)
 int doit()
          Executes the AddContentCommand, which gets the Node from the active context and adds it to the project.
 int doit(boolean includeSubFolders)
          Executes the AddContentCommand, which gets the Node from the active context and adds it to the project.
 int doit(java.lang.String contentSetKey)
          Executes the AddContentCommand, which gets the Node from the active context and adds it to the project.
 int doit(java.lang.String contentSetKey, boolean includeSubFolders)
          Executes the AddContentCommand, which gets the Node from the active context and adds it to the project.
static void registerPreferredContentSet(java.lang.Class nodeClass, java.lang.String contentSetKey)
          Registers the content set identified by the content set key as the preferred content set to which to add nodes of the supplied class type.
static void unRegisterPreferredContentSet(java.lang.Class nodeClass, java.lang.String contentSetKey)
          Unregisters the node of the supplied class type with the content set key.

 

Methods inherited from class oracle.ide.controller.Command
getAffectedNodes, getContext, getData, getId, getName, getType, isGlobal, setContext, setData, undo

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

ADD_URL_TO_PROJECT_CMD_ID

public static final int ADD_URL_TO_PROJECT_CMD_ID

ADD_TO_PROJECT_CMD_ID

public static final int ADD_TO_PROJECT_CMD_ID

FAILED

public static final int FAILED
Indicates that the command failed because content could not be added to the content set.
See Also:
Constant Field Values

Constructor Detail

AddContentCommand

public AddContentCommand()
Creates the AddContentCommand.

Method Detail

registerPreferredContentSet

public static void registerPreferredContentSet(java.lang.Class nodeClass,
                                               java.lang.String contentSetKey)
Registers the content set identified by the content set key as the preferred content set to which to add nodes of the supplied class type.
Parameters:
nodeClass - the node type
contentSetKey - the unique content set key

unRegisterPreferredContentSet

public static void unRegisterPreferredContentSet(java.lang.Class nodeClass,
                                                 java.lang.String contentSetKey)
Unregisters the node of the supplied class type with the content set key.
Parameters:
nodeClass - the node type
contentSetKey - the unique content set key

addToProject

public static void addToProject(Node node,
                                Project project,
                                java.lang.String contentSetKey)
Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)

addToProject

public static void addToProject(Node[] nodes,
                                Project project,
                                java.lang.String contentSetKey)
Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)

addToProject

public static void addToProject(Context context,
                                java.lang.String contentSetKey)
Deprecated. Use Project.add(Node, String) or Project.add(Node[], String)

doit

public int doit(boolean includeSubFolders)
         throws java.lang.Exception
Executes the AddContentCommand, which gets the Node from the active context and adds it to the project. Clients should call setContext(Context) after creating the command. If the Node in the context cannot be "unexcluded" from an existing content set, the user will be prompted to choose the content set to which to add the Node.
Parameters:
includeSubFolders - indicates whether or not subfolders are added (ignored if the supplied url is a file)
Returns:
OK if the Node was restored or added to the project, CANCEL if the user canceled the command, or FAILED if the Node could not be added to the project
Throws:
java.lang.Exception
See Also:
doit(String), doit(String, boolean)

doit

public int doit(java.lang.String contentSetKey)
         throws java.lang.Exception
Executes the AddContentCommand, which gets the Node from the active context and adds it to the project. Clients should call setContext(Context) after creating the command. If hte Node cannot be restored from the content set identified by contentSetKey, the content will be added to a new content folder.
Parameters:
contentSetKey - the data key for the content set to which the Node should be added
Returns:
OK if the Node was restored or added to the project, CANCEL if the user canceled the command, or FAILED if the Node could not be added to the project
Throws:
java.lang.Exception
See Also:
doit(), doit(boolean), doit(String)

doit

public int doit(java.lang.String contentSetKey,
                boolean includeSubFolders)
         throws java.lang.Exception
Executes the AddContentCommand, which gets the Node from the active context and adds it to the project. Clients should call setContext(Context) after creating the command.
Parameters:
contentSetKey - the data key for the content set to which the Node should be added
includeSubFolders - indicates whether or not subfolders are added (ignored if the supplied url is a file)
Returns:
OK if the Node was restored or added to the project, CANCEL if the user canceled the command, or FAILED if the Node could not be added to the project
Throws:
java.lang.Exception
java.lang.IllegalArgumentException - if contentSetKey is not a valid key
See Also:
Command.OK, Command.CANCEL

doit

public int doit()
         throws java.lang.Exception
Executes the AddContentCommand, which gets the Node from the active context and adds it to the project. Clients should call setContext(Context) after creating the command.
Specified by:
doit in class Command
Returns:
OK if the Node was restored or added to the project, CANCEL if the user canceled the command, or FAILED if the Node could not be added to the project
Throws:
java.lang.Exception
See Also:
doit(boolean), doit(String), doit(String, boolean)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.5.0)

E13403-06


Copyright © 1997, 2011, Oracle. All rights reserved.