Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


oracle.ide.file
Class ContentSetRoot

java.lang.Object
  extended by oracle.ide.file.ContentSetRoot


public final class ContentSetRoot
extends java.lang.Object

A single root directory in a ContentSet.

Since:
11.1.2

Method Summary
 FileSet asFileSet()
          Get a file set that contains the files in this root.
static Path asPath(java.util.Collection<ContentSetRoot> roots)
          Convert a collection of content set roots to a Path.
 boolean contains(java.net.URL url)
          Determine whether this root contains a URL.
 boolean equals(java.lang.Object object)
           
static java.util.Collection<ContentSetRoot> getContentSetRoots(Project project)
          Get the content set roots for a project.
static java.util.Collection<ContentSetRoot> getContentSetRoots(Project project, ContentSet contentSet)
          Get the content set roots for a specific content set of a project.
static java.util.Collection<ContentSetRoot> getContentSetRoots(Workspace workspace)
          Get the content set roots for an application.
static java.util.Collection<ContentSetRoot> getContentSetRoots(Workspace workspace, ContentSet contentSet)
          Get the content set roots for a specific content set of an application.
static java.util.Collection<ContentSetRoot> getContentSetRootsContaining(Project project, java.net.URL url)
          Returns the content set roots in the project that contain a specific URL.
static java.util.Collection<ContentSetRoot> getContentSetRootsContaining(java.net.URL url)
          Returns the content set roots that contain a specific URL.
 FileSetFilter getFilter()
          Get the filter of this content set root.
static ContentSetRoot getInstance(Project project, FileSet fileSet)
           
 Project getProject()
          Get the project for this root, or null if this root is not associated with a project.
 java.net.URL getURL()
          Get the root URL for this content set root.
 int hashCode()
           

 

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

 

Method Detail

getContentSetRoots

public static java.util.Collection<ContentSetRoot> getContentSetRoots(@NotNull
                                                                      Workspace workspace)
Get the content set roots for an application.
Parameters:
workspace - the application workspace
Returns:
the content set roots in the application content

getContentSetRoots

public static java.util.Collection<ContentSetRoot> getContentSetRoots(@NotNull
                                                                      Workspace workspace,
                                                                      @NotNull
                                                                      ContentSet contentSet)
Get the content set roots for a specific content set of an application.
Parameters:
workspace - the application workspace
contentSet - the content set
Returns:
the content set roots in the content set

getContentSetRoots

public static java.util.Collection<ContentSetRoot> getContentSetRoots(@NotNull
                                                                      Project project)
Get the content set roots for a project.
Parameters:
project - the project
Returns:
the content set roots in the project

getContentSetRoots

public static java.util.Collection<ContentSetRoot> getContentSetRoots(@NotNull
                                                                      Project project,
                                                                      @NotNull
                                                                      ContentSet contentSet)
Get the content set roots for a specific content set of a project.
Parameters:
project - the project
contentSet - the content set
Returns:
the content set roots in the content set

asPath

public static Path asPath(java.util.Collection<ContentSetRoot> roots)
Convert a collection of content set roots to a Path.
Parameters:
roots - the roots
Returns:
the Path

getContentSetRootsContaining

public static java.util.Collection<ContentSetRoot> getContentSetRootsContaining(@NotNull
                                                                                java.net.URL url)
Returns the content set roots that contain a specific URL.

It is significant that this method does not take a Context, Project, or Workspace as a parameter. The only case where callers should ever need to use this method is precisely when they don't know the context for the URL. If a caller knows the context, they should already know where to find the URL. Specifically, in cases where the caller knows what Project the URL is part of, they should use the getContentSetRootsContaining(Project,URL) method instead.

The only legitimate use of this method is in cases where the URL has come from a source outside of the IDE. For example, a source control system or file system might delvier an event about a file. In such cases, since the event originated outside the IDE, there is no IDE context associated with it. The only choice in that case is to call this method to find the appropriate context(s).

Parameters:
url - the URL
Returns:
the content set roots containing the URL, or an empty collection if no content set roots contain the file

getContentSetRootsContaining

public static java.util.Collection<ContentSetRoot> getContentSetRootsContaining(@NotNull
                                                                                Project project,
                                                                                @NotNull
                                                                                java.net.URL url)
Returns the content set roots in the project that contain a specific URL.
Parameters:
project - the project
url - the URL
Returns:
the content set roots in the project that contain the URL, or an empty collection if no content set roots contain the file

getInstance

public static ContentSetRoot getInstance(Project project,
                                         FileSet fileSet)

getProject

public Project getProject()
Get the project for this root, or null if this root is not associated with a project.
Returns:
the project, or null if this root is not associated with a project

getURL

public java.net.URL getURL()
Get the root URL for this content set root.
Returns:
the root URL

getFilter

public FileSetFilter getFilter()
Get the filter of this content set root.
Returns:
the filter

contains

public boolean contains(java.net.URL url)
Determine whether this root contains a URL. Note that this only takes into account the filters of this root. It does not apply the GlobalIgnoreList filters or any other filters.
Parameters:
url - the URL
Returns:
true if this root contains the given URL, false otherwise

asFileSet

public FileSet asFileSet()
Get a file set that contains the files in this root.
Returns:
the file set

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object object)
Overrides:
equals in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.2.0)

E17493-03


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