|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.editor.policy.ApplicationState
public final class ApplicationState
Describes persistent application state.
Constructor Summary | |
---|---|
ApplicationState()
Creates a new application state. |
Method Summary | |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener that gets notified on bound property changes. |
void |
addRecentFiles(FileType type,
String file)
Adds a recent file of the specified type. |
void |
addRecentFiles(String file)
Convenience method to add a file entry to the recent files list. |
String[] |
getRecentFiles()
Returns a clone of the recent files list of this application state. |
String |
getRecentFiles(int index)
Returns a recent files entry at the specified index. |
int |
getRecentFilesCount()
Returns the number of recent files stored at this application state. |
Map<String,String> |
getWorkingDirectories()
Java bean accessor for the working directories. |
String |
getWorkingDirectory(FileType type)
Returns the working directory bean property. |
File |
getWorkingDirectoryFile(FileType type)
Returns the application working directory as file. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes the specified property change listener. |
void |
removeRecentFiles(int index)
Convenience method to remove the file entry at the specified index. |
void |
setRecentFiles(int index,
String file)
Sets the recent files entry at the specified index. |
void |
setRecentFiles(String[] files)
Sets the recent files list of this application state. |
void |
setWorkingDirectories(Map<String,String> workingDirectories)
Java bean setter for the working directories. |
void |
setWorkingDirectory(FileType type,
String workingDirectory)
Sets the working directory bean property. |
void |
setWorkingDirectoryFile(FileType type,
File file)
Sets the application working directory from the given file. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ApplicationState()
Method Detail |
---|
public void addPropertyChangeListener(PropertyChangeListener listener)
The same listener object may be added more than once, and will be called
as many times as it is added. If listener
is null
, no exception
is thrown and no action is taken.
listener
- the listener to add.public void removePropertyChangeListener(PropertyChangeListener listener)
If listener
was added more than once to the same event source,
it will be notified one less time after being removed. If listener
is
null
, or was never added, no exception is thrown and no action is taken.
listener
- the listener to remove.public Map<String,String> getWorkingDirectories()
Note: This method is intended for bean bindings and serialization, do not use directly. Wse the various getWorkingDirectory methods instead.
public void setWorkingDirectories(Map<String,String> workingDirectories)
Note: This method is intended for bean bindings and serialization, do not use directly. Wse the various setWorkingDirectory methods instead.
workingDirectories
- the new working directories to set.public String getWorkingDirectory(FileType type)
Use the file version
if you are interested
in an actual File
object.
type
- the type of working directory to retrieve.
getWorkingDirectoryFile(FileType)
public void setWorkingDirectory(FileType type, String workingDirectory)
Use the file version
if your source
is an actual File
object.
type
- the type of working directory to set.workingDirectory
- the working directory bean property.setWorkingDirectoryFile(FileType,File)
public File getWorkingDirectoryFile(FileType type)
Convenience method for the working directory bean property.
type
- the type of working directory to retrieve.
getWorkingDirectory(FileType)
public void setWorkingDirectoryFile(FileType type, File file)
If the file denotes a directory it is used as is, in case of a plain file the parent directory is chosen.
Convenience method for the working directory bean property.
type
- the type of working directory to set.file
- the working directory to set.setWorkingDirectory(FileType,String)
public String getRecentFiles(int index)
index
- the index of the recent files entry to retrieve.
null
if there is no such entry.public int getRecentFilesCount()
public String[] getRecentFiles()
null
.public void setRecentFiles(int index, String file)
index
- the index of the file entry to set, [0..getRecentFilesCount()
[.file
- the file to entry to set, null
to remove the entry.getRecentFilesCount()
IllegalArgumentException
- if the index is not a valid index.public void removeRecentFiles(int index)
This method changes the whole recent files list.
index
- the index of the file entry to set, [0..getRecentFilesCount()
[.
IllegalArgumentException
- if the index is not a valid index.public void addRecentFiles(FileType type, String file)
Note: Currently only files of type FileType.XML_POLICY
are stored.
type
- the type of file to add.file
- the file to add.addRecentFiles(String)
public void addRecentFiles(String file)
This method does nothing if the file entry is null
or there is already a
file entry equal to the one specified contained.
This method changes the whole recent files list.
file
- the file entry to add, may be null
.public void setRecentFiles(String[] files)
files
- the new files list to set, null
to set an empty files list.public String toString()
toString
in class Object
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:17:21
Copyright (c) 2002-2007 Ergon Informatik AG