Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.project
Class ApplicationProjectFile

    java.lang.Object
      org.apache.cayenne.project.ProjectFile
          org.apache.cayenne.project.ApplicationProjectFile

    public class ApplicationProjectFile

extends ProjectFile

ApplicationProjectFile is a ProjectFile abstraction of the main project file in a Cayenne project. Right now Cayenne projects can not be renamed, so all the name tracking functionality is pretty much noop.

Author:
  Andrei Adamchik

Field Summary
`protected ConfigSaverDelegate` | `saveDelegate`

Fields inherited from class org.apache.cayenne.project.ProjectFile
`location, projectObj, tempFile`

Constructor Summary
`ApplicationProjectFile(Project project)` Constructor for default ApplicationProjectFile.
`ApplicationProjectFile(Project project, java.lang.String fileName)` Constructor for ApplicationProjectFile with an existing file.

Method Summary
`boolean` | `canHandle(java.lang.Object obj)` Returns true if this file wrapper can handle a specified object.
`java.lang.String` | `getLocationSuffix()` Returns suffix to append to object name when creating a file name.
`java.lang.Object` | `getObject()` Returns a project.
`java.lang.String` | `getObjectName()` Returns a name of associated object, that is also used as a file name.
`ConfigSaverDelegate` | `getSaveDelegate()` Returns the saveDelegate.
`void` | `save(java.io.PrintWriter out)` Saves an underlying object to the file.
`void` | `setSaveDelegate(ConfigSaverDelegate saveDelegate)` Sets the saveDelegate.

Methods inherited from class org.apache.cayenne.project.ProjectFile
`canHandleObject, checkWritePermissions, getLocation, getOldLocation, getProject, isRenamed, resolveFile, resolveOldFile, saveCommit, saveTemp, saveUndo, synchronizeLocation, tempFileForFile, toString, willSave`

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

Field Detail

### saveDelegate

    protected ConfigSaverDelegate saveDelegate

Constructor Detail

### ApplicationProjectFile

    public ApplicationProjectFile(Project project)

  Constructor for default ApplicationProjectFile.

### ApplicationProjectFile

    public ApplicationProjectFile(Project project,
                                  java.lang.String fileName)

  Constructor for ApplicationProjectFile with an existing file.

Method Detail

### getLocationSuffix

    public java.lang.String getLocationSuffix()

  Returns suffix to append to object name when creating a file name. Default implementation returns empty string.

  Overrides:
    `getLocationSuffix` in class `ProjectFile`

### getObject

    public java.lang.Object getObject()

  Returns a project.

  Specified by:
    `getObject` in class `ProjectFile`

### getObjectName

    public java.lang.String getObjectName()

  Description copied from class: `ProjectFile`
  Returns a name of associated object, that is also used as a file name.

  Specified by:
    `getObjectName` in class `ProjectFile`
  See Also:
    `ProjectFile.getObjectName()`

### save

    public void save(java.io.PrintWriter out)
              throws java.lang.Exception

  Description copied from class: `ProjectFile`
  Saves an underlying object to the file. The procedure is dependent on the type of object and is implemented by concrete subclasses.

  Specified by:
    `save` in class `ProjectFile`
  Throws:
    `java.lang.Exception`

### canHandle

    public boolean canHandle(java.lang.Object obj)

  Description copied from class: `ProjectFile`
  Returns true if this file wrapper can handle a specified object.

  Specified by:
    `canHandle` in class `ProjectFile`

### getSaveDelegate

    public ConfigSaverDelegate getSaveDelegate()

  Returns the saveDelegate.

  Returns:
    ConfigSaverDelegate

### setSaveDelegate

    public void setSaveDelegate(ConfigSaverDelegate saveDelegate)

  Sets the saveDelegate.

  Parameters:
    `saveDelegate` - The saveDelegate to set

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.