spcp7.imagegallery.abstractionlayer.impl.utils
Class CprValidation

java.lang.Object
  extended by spcp7.imagegallery.abstractionlayer.impl.utils.CprValidation

public class CprValidation
extends java.lang.Object

This class provides content provider registry specific validation methods.

Author:
Phillip Merensky

Constructor Summary
CprValidation()
           
 
Method Summary
 void setContentProviderRegistry(ContentProviderRegistryFace contentProviderRegistry)
           
 boolean validateBoolean(java.lang.String bool)
           
 void validateContentFolderModel(ContentFolderModelFace cf)
          Name, content storage path, properties and the content provider type ID are validated.
 void validateContentProviderTypeID(java.lang.String typeId)
           
 boolean validateNumber(java.lang.String number)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CprValidation

public CprValidation()
Method Detail

validateContentFolderModel

public void validateContentFolderModel(ContentFolderModelFace cf)
                                throws ContentFolderValidationException,
                                       ContentProviderNotAvailableException,
                                       PropertyBooleanValidationException,
                                       PropertyNumberValidationException
Name, content storage path, properties and the content provider type ID are validated. The id field will not be validated as it has to be null when inserting a new content folder.

Parameters:
cf - Content folder to validate
Throws:
ContentFolderValidationException - if the name of the content folder is empty.
ContentProviderNotAvailableException - if no content provider is set.
PropertyBooleanValidationException - if PropertyModelFace.getBool() is true and PropertyModelFace.getWert() is not boolean.
PropertyNumberValidationException - if PropertyModelFace.getNumber() is true and PropertyModelFace.getWert() is not a number.

validateNumber

public boolean validateNumber(java.lang.String number)

validateBoolean

public boolean validateBoolean(java.lang.String bool)

validateContentProviderTypeID

public void validateContentProviderTypeID(java.lang.String typeId)
                                   throws ContentProviderNotAvailableException
Parameters:
typeId - The type Id which should be validated.
Throws:
ContentProviderNotAvailableException

setContentProviderRegistry

public void setContentProviderRegistry(ContentProviderRegistryFace contentProviderRegistry)
Parameters:
contentProviderRegistry - the contentProviderRegistry to set


Copyright © 2008. All Rights Reserved.