|
JDIC API V0.9 Release 4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jdesktop.jdic.filetypes.AssociationService
public class AssociationService
The AssociationService
class provides several methods to access
the file type associations. It includes methods to retrieve a particular
file type association, to register a new file type association into the system,
and to unregister a registered file type association from the system.
Each file type association is represented by an Association
object.
The file type information storage and access mechanism is platform-dependent:
Association
,
Action
Constructor Summary | |
---|---|
AssociationService()
Constructor of an AssociationService object. |
Method Summary | |
---|---|
Association |
getAssociationByContent(java.net.URL url)
Returns the association representing the file type of the file the given URL points to. |
Association |
getFileExtensionAssociation(java.lang.String fileExt)
Returns the association representing the file type of the given file extension. |
Association |
getMimeTypeAssociation(java.lang.String mimeType)
Returns the association representing the file type of the given MIME type. |
void |
registerSystemAssociation(Association assoc)
Registers the given association in the system level. |
void |
registerUserAssociation(Association assoc)
Registers the given association in the user specific level. |
void |
unregisterSystemAssociation(Association assoc)
Unregisters the given association in the system level. |
void |
unregisterUserAssociation(Association assoc)
Unregisters the given association in the user specific level. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AssociationService()
AssociationService
object.
Method Detail |
---|
public Association getMimeTypeAssociation(java.lang.String mimeType)
mimeType
- a given MIME type name.
Association
object; null
if the given MIME type is not found in the system.public Association getFileExtensionAssociation(java.lang.String fileExt)
The file extension list in the returned Association
object
contains only this given file extension.
fileExt
- a given file extension name.
Association
object; null
if the given file extension is not found in the system.public Association getAssociationByContent(java.net.URL url)
url
- a given URL.
Association
object; null
if the file type of the file the given URL points to is not
found in the system.public void registerUserAssociation(Association assoc) throws AssociationAlreadyRegisteredException, RegisterFailedException
For Windows NT, Windows Me/98/95: the registration is always system wide, since all users share the same association information.
For Windows 2000 and Windows XP: the registration is only applied to this specific user.
assoc
- a given Association
object.
java.lang.IllegalArgumentException
- if the given association is not valid for
this operation.
AssociationAlreadyRegisteredException
- if the given association
already exists in the system.
RegisterFailedException
- if the given association fails to be
registered in the system.public void unregisterUserAssociation(Association assoc) throws AssociationNotRegisteredException, RegisterFailedException
For Windows NT, Windows Me/98/95: the unregistration is always system wide, since all users share the same association information.
For Windows 2000 and Windows XP: the unregistration is only applied to this specific user.
assoc
- a given Association object.
java.lang.IllegalArgumentException
- if the given association is not valid for
this operation.
AssociationNotRegisteredException
- if the given association doesn't
exist in the system.
RegisterFailedException
- if the given association fails to be
unregistered in the system.public void registerSystemAssociation(Association assoc) throws AssociationAlreadyRegisteredException, RegisterFailedException
For Windows XP: the user needs the administrator permission to access the system association information in the registry.
assoc
- a given Association
object.
java.lang.IllegalArgumentException
- if the given association is not valid for
this operation.
AssociationAlreadyRegisteredException
- if the given association
already exists in the system.
RegisterFailedException
- if the given association fails to be
registered in the system.public void unregisterSystemAssociation(Association assoc) throws AssociationNotRegisteredException, RegisterFailedException
For Windows XP: the user needs the administrator permission to access the system association information in the registry.
assoc
- a given Association object.
java.lang.IllegalArgumentException
- if the given association is not valid for
this operation.
AssociationNotRegisteredException
- if the given association doesn't
exist in the system.
RegisterFailedException
- if the given association fails to be
unregistered in the system.
|
JDIC API V0.9 Release 4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, working code examples, license terms and bug report information.
Copyright (c) 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.