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

E13403-08

oracle.jdeveloper.builder
Class SourceModel

java.lang.Object
  extended by oracle.jdeveloper.builder.SourceModel
Direct Known Subclasses:
ClassSourceModel, FileBuilderModel.FileSourceModel, FolderSourceModel, PackageSourceModel

public class SourceModel
extends java.lang.Object


Constructor Summary
SourceModel()
           
 
Method Summary
 boolean checkForExistingFile()
           
 Node createNode()
           
 void generateDefaultFileName(java.lang.String baseName)
           
 boolean getAllowUrlsNotInSourcePath()
           
 java.net.URL getBaseURL()
           
protected  java.lang.String getContentSetKey()
          Gets the key that identifies the content set for this SourceModel.
protected  int getDefaultNameStartIndex()
           
 java.net.URL getDirectory()
           
protected  java.lang.String getDirectoryString()
           
 java.lang.String getExtension()
          Retrieves the extension used when creating new files.
 java.lang.String getFileName()
           
protected
<T extends Node>
java.lang.Class<T>
getNodeType()
          Get the Node type for the source file.
 Project getProject()
           
 java.lang.String getRelativeDirectory()
           
protected  URLPath getSourcePath()
           
 java.net.URL getURL()
           
 boolean isInSourcePath(java.net.URL url)
           
 void setAllowUrlsNotInSourcePath(boolean allowUrlsNotInSourcePath)
           
 void setDirectory(java.net.URL url)
           
 void setFileName(java.lang.String newFileName)
           
 void setProject(Project newProj)
           
 void setRelativeDirectory(java.lang.String newDirectory)
           
 void setURL(java.net.URL url)
          Sets the URL.
protected  void updateBaseURLFromProject()
           
 boolean verifyPath()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SourceModel

public SourceModel()
Method Detail

getURL

public final java.net.URL getURL()

setURL

public final void setURL(java.net.URL url)
Sets the URL. Note that this method only sets the directory of the SourceModel to the parent of the specified url. It does not modify the filename of the SourceModel. This behavior, while wrong, is being preserved for behavioral compatibility.

Parameters:
url - a url

verifyPath

public final boolean verifyPath()

createNode

public Node createNode()

checkForExistingFile

public final boolean checkForExistingFile()

generateDefaultFileName

public void generateDefaultFileName(java.lang.String baseName)

getFileName

public java.lang.String getFileName()

setFileName

public void setFileName(java.lang.String newFileName)

getRelativeDirectory

public final java.lang.String getRelativeDirectory()

setRelativeDirectory

public void setRelativeDirectory(java.lang.String newDirectory)

getDirectory

public java.net.URL getDirectory()

getDirectoryString

protected java.lang.String getDirectoryString()

setDirectory

public final void setDirectory(java.net.URL url)

isInSourcePath

public boolean isInSourcePath(java.net.URL url)

getBaseURL

public final java.net.URL getBaseURL()

getProject

public final Project getProject()

setProject

public void setProject(Project newProj)
                throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

updateBaseURLFromProject

protected void updateBaseURLFromProject()

getExtension

public java.lang.String getExtension()
Retrieves the extension used when creating new files. The extension should include the '.'.

Returns:
the file extension to use when creating the file associated with this SourceModel.

getDefaultNameStartIndex

protected int getDefaultNameStartIndex()

getNodeType

protected <T extends Node> java.lang.Class<T> getNodeType()
Get the Node type for the source file.

Returns:
the Node subclass that should be instantiated for this source model, or null if the default Node type should be used.

getSourcePath

protected URLPath getSourcePath()

getContentSetKey

protected java.lang.String getContentSetKey()
Gets the key that identifies the content set for this SourceModel. This key is used to determine the content set to which to add new files that are created with this source model. Subclasses should override this method to add generated files to a content set other than Resources. Note, the key returned must match a valid ContentSetProvider key.

Returns:
the content set key
See Also:
createNode(), ContentSetProvider

setAllowUrlsNotInSourcePath

public void setAllowUrlsNotInSourcePath(boolean allowUrlsNotInSourcePath)

getAllowUrlsNotInSourcePath

public boolean getAllowUrlsNotInSourcePath()

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.