Overview | Package | Class | Use | 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 CayenneUserDir

    java.lang.Object
      org.apache.cayenne.project.CayenneUserDir

    public class CayenneUserDir

extends Object

CayenneUserDir represents a directory where all Cayenne-related information is stored on the user machine. This is normally a `$HOME/.cayenne` directory.

Author:
  Andrus Adamchik

Field Summary
`static String` | `ALT_USER_DIR_PROPERTY` A property name for the property that allows to define an alternative location of Cayenne User Directory (instead of default "$HOME/.cayenne").
`static String` | `CAYENNE_DIR`
`protected File` | `cayenneUserDir`
`protected static CayenneUserDir` | `sharedInstance`

Constructor Summary
`protected` | `CayenneUserDir()` Constructor for CayenneUserDir.

Method Summary
`boolean` | `canRead()` Return false if the directory is not accessible for any reason at least for reading.
`boolean` | `canWrite()` Return false if the directory is not accessible for any reason at least for reading.
`File` | `getDirectory()` Returns a directory object where all user Cayenne-related configuration is stored.
`static CayenneUserDir` | `getInstance()`
`File` | `resolveFile(String name)`

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

Field Detail

### sharedInstance

    protected static CayenneUserDir sharedInstance

### CAYENNE_DIR

    public static final String CAYENNE_DIR

See Also:
  Constant Field Values

### ALT_USER_DIR_PROPERTY

    public static final String ALT_USER_DIR_PROPERTY

  A property name for the property that allows to define an alternative location of Cayenne User Directory (instead of default "$HOME/.cayenne").

  Since:
    1.1
  See Also:
    Constant Field Values

### cayenneUserDir

    protected File cayenneUserDir

Constructor Detail

### CayenneUserDir

    protected CayenneUserDir()

  Constructor for CayenneUserDir.

Method Detail

### getInstance

    public static CayenneUserDir getInstance()

### getDirectory

    public File getDirectory()

  Returns a directory object where all user Cayenne-related configuration is stored. May return null if the directory is not accessible for whatever reason.

### canRead

    public boolean canRead()

  Return false if the directory is not accessible for any reason at least for reading.

### canWrite

    public boolean canWrite()

  Return false if the directory is not accessible for any reason at least for reading.

### resolveFile

    public File resolveFile(String name)

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

Copyright © 2001-2008 Apache Cayenne. All Rights Reserved.