|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.security.auth.callback.NameCallback issrg.security.FilenameCallback
public class FilenameCallback
This class represents a Filename Callback, which is used by CallbackHandler at the login stage. It helps the CallbackHandler display the right controls to select the right file (correct type and extension). By extending from NameCallback it is ensured that even CallbackHandlers that do not distinguish this special type of callback will still be able to let the user authenticate.
Constructor Summary | |
---|---|
FilenameCallback(java.lang.String prompt,
java.lang.String defaultFile,
java.lang.String searchType,
java.lang.String[] extensions)
This constructor builds the FilenameCallback given the bunch of parameters describing the valid files. |
Method Summary | |
---|---|
java.lang.String |
getDefaultFile()
This method returns the default file name to be used if the user didn't select a new file name. |
java.lang.String[] |
getExtensions()
This method returns the array of filename extensions to help filter out wrong candidate files in the OpenFile dialog. |
java.lang.String |
getFileName()
This method returns the filename that was actiually selected by the user. |
java.lang.String |
getSearchType()
This method returns the search type, which is a human-readable string, useful in OpenFile dialogs (it is the human-readable name of the file types, usually displayed in the drop-down list box with filename filters in it). |
void |
setFileName(java.lang.String fn)
This method sets the filename that the user selected. |
Methods inherited from class javax.security.auth.callback.NameCallback |
---|
getDefaultName, getName, getPrompt, setName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FilenameCallback(java.lang.String prompt, java.lang.String defaultFile, java.lang.String searchType, java.lang.String[] extensions)
prompt
- - the prompt to be displayed next to the text input controldefaultFile
- - the default file name that the CallbackHandler should
assume if no input was collected from the usersearchType
- - the human-readable string that hints what type of file
the user should be looking for; useful for constructing FileOpen dialogs
and suchextensions
- - the set of extensions that the acceptable file must
have;
useful for constructing FileOpen dialogsMethod Detail |
---|
public java.lang.String getDefaultFile()
public java.lang.String getSearchType()
public java.lang.String[] getExtensions()
public java.lang.String getFileName()
public void setFileName(java.lang.String fn)
fn
- - the filename that the user selected
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |