sysmodelmgr/com.symbian.smt.gui/src/com/symbian/smt/gui/smtwidgets/IFileInputValidator.java
changeset 0 522a326673b6
equal deleted inserted replaced
-1:000000000000 0:522a326673b6
       
     1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // IFileInputValidator
       
    15 //
       
    16 
       
    17 
       
    18 
       
    19 package com.symbian.smt.gui.smtwidgets;
       
    20 
       
    21 import org.eclipse.jface.dialogs.IInputValidator;
       
    22 
       
    23 /**
       
    24  * This is an extension of the IInputValidator interface which caters for
       
    25  * validation of local files and URLs.
       
    26  * <p>
       
    27  * While isValid() is invoked dynamically as the user types his input (as per
       
    28  * the standard IInputValidator interface), the methods
       
    29  * <code>isFileReadable()</code> and <code>isUrlResourceReadable</code> defined
       
    30  * by this interface are invoked when the user presses the dialog's OK button,
       
    31  * as these operations may take longer to execute.
       
    32  * <p>
       
    33  * The third method, <code>isUrl()</code>, is a utility method that determines
       
    34  * whether a given String is a URL or a simple file path.
       
    35  * 
       
    36  * @author barbararosi-schwartz
       
    37  * 
       
    38  */
       
    39 public interface IFileInputValidator extends IInputValidator {
       
    40 	
       
    41 	// The unconventional method signature follows the pattern of 
       
    42 	// IInputValidator's isValid() method.
       
    43 	public String isFileReadable(String filePath);
       
    44 
       
    45 	// The unconventional method signature follows the pattern of 
       
    46 	// IInputValidator's isValid() method.
       
    47 	public boolean isUrl(String filePath) throws InvalidPathException;
       
    48 
       
    49 	// The unconventional method signature follows the pattern of 
       
    50 	// IInputValidator's isValid() method.
       
    51 	public String isUrlResourceReadable(String urlPath);
       
    52 }