org.jdesktop.jdic.filetypes.internal
Interface AppAssociationWriter


public interface AppAssociationWriter

Containing funtions to modify the association information


Field Summary
static int DEFAULT_LEVEL
           
static int SYSTEM_LEVEL
           
static int USER_LEVEL
          Constants for the registration/unregistration level.
 
Method Summary
 void checkAssociationValidForRegistration(Association assoc)
          Checks whether the given assocation is valid for registration according to platform-specific logic.
 void checkAssociationValidForUnregistration(Association assoc)
          Checks whether the given assocation is valid for unregistration according to platform-specific logic.
 boolean isAssociationExist(Association assoc, int level)
          Checks whether the given assocation exists in the system
 void registerAssociation(Association assoc, int level)
          Registers the given association within specified level.
 void unregisterAssociation(Association assoc, int level)
          Unregisters the given association in specified level.
 

Field Detail

USER_LEVEL

static final int USER_LEVEL
Constants for the registration/unregistration level.

See Also:
Constant Field Values

SYSTEM_LEVEL

static final int SYSTEM_LEVEL
See Also:
Constant Field Values

DEFAULT_LEVEL

static final int DEFAULT_LEVEL
See Also:
Constant Field Values
Method Detail

checkAssociationValidForRegistration

void checkAssociationValidForRegistration(Association assoc)
                                          throws java.lang.IllegalArgumentException
Checks whether the given assocation is valid for registration according to platform-specific logic.

Parameters:
assoc - a given Association object.
Throws:
java.lang.IllegalArgumentException - if the given association is not valid for registration.

checkAssociationValidForUnregistration

void checkAssociationValidForUnregistration(Association assoc)
                                            throws java.lang.IllegalArgumentException
Checks whether the given assocation is valid for unregistration according to platform-specific logic.

Parameters:
assoc - a given Association object.
Throws:
java.lang.IllegalArgumentException - if the given association is not valid for unregistration.

isAssociationExist

boolean isAssociationExist(Association assoc,
                           int level)
Checks whether the given assocation exists in the system

Parameters:
assoc - a given Association object.
level - a given MIME database level.
Returns:
true if the given Association already exists in the specified MIME database.

registerAssociation

void registerAssociation(Association assoc,
                         int level)
                         throws AssociationAlreadyRegisteredException,
                                RegisterFailedException
Registers the given association within specified level.

Parameters:
assoc - a given Association object.
level - a given registration level
Throws:
AssociationAlreadyRegisteredException - if the given association has been registered in the system.
RegisterFailedException - if the given association fails to be registered.

unregisterAssociation

void unregisterAssociation(Association assoc,
                           int level)
                           throws AssociationNotRegisteredException,
                                  RegisterFailedException
Unregisters the given association in specified level.

Parameters:
assoc - a given Association object.
level - a given registration level
Throws:
AssociationNotRegisteredException - if the given association has not been registered before.
RegisterFailedException - if the given association fails to be unregistered.


Copyright © 2005 Sun Microsystems All Rights Reserved.