| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.ide.controller.Command
oracle.ide.cmd.AddContentCommand
public class AddContentCommand
The AddContentCommand class implements adding content
 to a project.
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 | 
|---|
public static final int ADD_URL_TO_PROJECT_CMD_ID
public static final int ADD_TO_PROJECT_CMD_ID
public static final int FAILED
| Constructor Detail | 
|---|
public AddContentCommand()
| Method Detail | 
|---|
public static void registerPreferredContentSet(java.lang.Class nodeClass,
                                               java.lang.String contentSetKey)
nodeClass - the node typecontentSetKey - the unique content set key
public static void unRegisterPreferredContentSet(java.lang.Class nodeClass,
                                                 java.lang.String contentSetKey)
nodeClass - the node typecontentSetKey - the unique content set key
public static void addToProject(Node node,
                                Project project,
                                java.lang.String contentSetKey)
Project.add(Node, String) or 
 Project.add(Node[], String)
public static void addToProject(Node[] nodes,
                                Project project,
                                java.lang.String contentSetKey)
Project.add(Node, String) or 
 Project.add(Node[], String)
public static void addToProject(Context context,
                                java.lang.String contentSetKey)
Project.add(Node, String) or 
 Project.add(Node[], String)
public int doit(boolean includeSubFolders)
         throws java.lang.Exception
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.
includeSubFolders - indicates whether or not subfolders 
  are added (ignored if the supplied url is a file)
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
java.lang.Exceptiondoit(String), 
doit(String, boolean)
public int doit(java.lang.String contentSetKey)
         throws java.lang.Exception
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.
contentSetKey - the data key for the content set to which 
  the Node should be added
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
java.lang.Exceptiondoit(), 
doit(boolean), 
doit(String)
public int doit(java.lang.String contentSetKey,
                boolean includeSubFolders)
         throws java.lang.Exception
AddContentCommand, which gets the 
 Node  from the active context and adds it to the
 project. Clients should call setContext(Context) after 
 creating the command.
contentSetKey - the data key for the content set to which the 
  Node should be addedincludeSubFolders - indicates whether or not subfolders 
  are added (ignored if the supplied url is a file)
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
java.lang.Exception
java.lang.IllegalArgumentException - if contentSetKey 
 is not a valid keyCommand.OK, 
Command.CANCEL
public int doit()
         throws java.lang.Exception
AddContentCommand, which gets the 
 Node from the active context and adds it to 
 the project. Clients should call setContext(Context) 
 after creating the command.
doit in class CommandNode 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
java.lang.Exceptiondoit(boolean), 
doit(String), 
doit(String, boolean)
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.4.0) E13403-05  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||