001: /*
002: * File : $Source: /usr/local/cvs/opencms/src/org/opencms/security/I_CmsValidationHandler.java,v $
003: * Date : $Date: 2008-02-27 12:05:29 $
004: * Version: $Revision: 1.6 $
005: *
006: * This library is part of OpenCms -
007: * the Open Source Content Management System
008: *
009: * Copyright (c) 2002 - 2008 Alkacon Software GmbH (http://www.alkacon.com)
010: *
011: * This library is free software; you can redistribute it and/or
012: * modify it under the terms of the GNU Lesser General Public
013: * License as published by the Free Software Foundation; either
014: * version 2.1 of the License, or (at your option) any later version.
015: *
016: * This library is distributed in the hope that it will be useful,
017: * but WITHOUT ANY WARRANTY; without even the implied warranty of
018: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
019: * Lesser General Public License for more details.
020: *
021: * For further information about Alkacon Software GmbH, please see the
022: * company website: http://www.alkacon.com
023: *
024: * For further information about OpenCms, please see the
025: * project website: http://www.opencms.org
026: *
027: * You should have received a copy of the GNU Lesser General Public
028: * License along with this library; if not, write to the Free Software
029: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
030: */
031:
032: package org.opencms.security;
033:
034: import org.opencms.main.CmsIllegalArgumentException;
035:
036: /**
037: * Defines general validation methods.<p>
038: *
039: * @author Michael Moossen
040: *
041: * @version $Revision: 1.6 $
042: *
043: * @since 6.3.0
044: */
045: public interface I_CmsValidationHandler {
046:
047: /**
048: * Checks if the provided email is a valid email address.<p>
049: *
050: * @param email the email address to validate
051: *
052: * @throws CmsIllegalArgumentException if the given email address is not valid
053: */
054: void checkEmail(String email) throws CmsIllegalArgumentException;
055:
056: /**
057: * Checks if the provided first name is valid.<p>
058: *
059: * @param firstname the first name to validate
060: *
061: * @throws CmsIllegalArgumentException if the given email address is not valid
062: */
063: void checkFirstname(String firstname)
064: throws CmsIllegalArgumentException;
065:
066: /**
067: * Checks if the provided group name is a valid group name.<p>
068: *
069: * @param groupName the group name to check
070: *
071: * @throws CmsIllegalArgumentException if the given group name is not valid
072: */
073: void checkGroupName(String groupName)
074: throws CmsIllegalArgumentException;
075:
076: /**
077: * Checks if the provided last name is valid.<p>
078: *
079: * @param lastname the last name to validate
080: *
081: * @throws CmsIllegalArgumentException if the given email address is not valid
082: */
083: void checkLastname(String lastname)
084: throws CmsIllegalArgumentException;
085:
086: /**
087: * Checks if the provided user name is a valid user name.<p>
088: *
089: * @param userName the user name to check
090: *
091: * @throws CmsIllegalArgumentException if the given user name is not valid
092: */
093: void checkUserName(String userName)
094: throws CmsIllegalArgumentException;
095:
096: /**
097: * Checks if the provided string is a valid zip code.<p>
098: *
099: * @param zipcode the zip code to validate
100: *
101: * @throws CmsIllegalArgumentException if the given zip code is not valid
102: */
103: void checkZipCode(String zipcode)
104: throws CmsIllegalArgumentException;
105: }
|