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

E13403-08

oracle.ide.model
Class ContentSetProvider

java.lang.Object
  extended by oracle.ide.model.ContentSetProvider

public abstract class ContentSetProvider
extends java.lang.Object

Callback class used to configure a Project with a ContentSet.


Constructor Summary
ContentSetProvider(java.lang.String key, java.lang.String shortLabel)
           
 
Method Summary
 boolean canContainJavaSources()
          Returns true if the ContentSetProvider may point to Java sources.
 boolean canExtendURLPath(Project project)
          Returns true if the ContentSetProvider allows a URL to be added to the ContentSet's URLPath in the given Project context.
 boolean displayFoldersAsPackages()
          Returns true if the ContentSetProvider wants its folders to be rendered in the UI as if they are Java packages.
 ContentSetHelper getContentSetHelper()
          Returns a ContentSetHelper, which is used to validate content before it is added to the content set, and to handle adding new content to the content set.
 java.lang.String getKey()
          Returns the HashStructure key that points to a sub-HashStructure instance within the Project.
abstract  Navigable getNavigable()
          Implement this method to return a Navigable that represents the UI for this provider's ContentSet in the Project Properties dialog.
 java.lang.String[][] getNoAutoExpandFilters()
          Return filters for files which when newly created will not be autoexpanded in th navigator.
 java.lang.String getShortLabel()
          Returns a user-displayable (and thus translatable) string representing this ContentSetProvider.
abstract  void initContentSet(ContentSet contentSet, java.net.URL projectDir, Context context)
          This method is called when a project is created or when a project is opened and is missing this provider's ContentSet.
 boolean isFlatLevelEnabled()
          Returns true if the flat level feature of the navigator should be abled for this ContentSetProvider.
 java.lang.String toString()
          Override of toString to provide a label to display for the ContentSetProvider when used in the UI.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ContentSetProvider

public ContentSetProvider(java.lang.String key,
                          java.lang.String shortLabel)
Parameters:
key - The key of the content set within the project file.
shortLabel - The short label used to identify the content set to the user. This is a translatable string.
Method Detail

getKey

public final java.lang.String getKey()
Returns the HashStructure key that points to a sub-HashStructure instance within the Project. The sub-HashStructure is then wrapped by ContentSet.


getShortLabel

public final java.lang.String getShortLabel()
Returns a user-displayable (and thus translatable) string representing this ContentSetProvider.


displayFoldersAsPackages

public boolean displayFoldersAsPackages()
Returns true if the ContentSetProvider wants its folders to be rendered in the UI as if they are Java packages. This method only affects how folders are displayed in the UI and does not affect the Java root directories of a project in the same way that canContainJavaSources() does.


canContainJavaSources

public boolean canContainJavaSources()
Returns true if the ContentSetProvider may point to Java sources. Returns false otherwise. The default return value is false. When the provider returns true, this affects how the Java root directories for a Project are determined by the ProjectContent.getJavaRootDirs() method. Typically, when a provider returns true from this method, it will also return true from displayFoldersAsPackages().


canExtendURLPath

public boolean canExtendURLPath(Project project)
Returns true if the ContentSetProvider allows a URL to be added to the ContentSet's URLPath in the given Project context. Returns false otherwise.


getContentSetHelper

public ContentSetHelper getContentSetHelper()
Returns a ContentSetHelper, which is used to validate content before it is added to the content set, and to handle adding new content to the content set.

Returns:
a ContentSetHelper.

isFlatLevelEnabled

public boolean isFlatLevelEnabled()
Returns true if the flat level feature of the navigator should be abled for this ContentSetProvider. The default return value is the same as canContainJavaSources(), so that the flat level support is automatically enabled if the ContentSetProvider represents Java sources.


initContentSet

public abstract void initContentSet(ContentSet contentSet,
                                    java.net.URL projectDir,
                                    Context context)
This method is called when a project is created or when a project is opened and is missing this provider's ContentSet. This method gives the ContentSetProvider an opportunity to make sure that its ContentSet and other project properties are properly initialized.

Parameters:
contentSet - The newly created ContentSet which needs to be initialized.
projectDir - The directory containing the project being modified. This is provided as a convenience, since most ContentSetProviders derive default paths based on the project directory.
context - The context in which the project creation is occurring. Calling context.getProject() will retrieve the Project instance being initialized with the ContentSet.

getNavigable

public abstract Navigable getNavigable()
Implement this method to return a Navigable that represents the UI for this provider's ContentSet in the Project Properties dialog.


getNoAutoExpandFilters

public java.lang.String[][] getNoAutoExpandFilters()
Return filters for files which when newly created will not be autoexpanded in th navigator. This method is temporary API only available in 11.1.1.5.0. Should you need the same functionality ioin latter releases use the no-autoexpand-filters in content-set-providers-hook.

Returns:
Array of string arrays containing the include and exclude filters. Include filters on the index 0, exclude filters at index 1. null in case no filters should be applied, which is the default behavior.

toString

public java.lang.String toString()
Override of toString to provide a label to display for the ContentSetProvider when used in the UI.

Overrides:
toString in class java.lang.Object
Returns:
user-friendly string for the ContentSetProvider

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

E13403-08

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