public void checkInterface(PageContext pc, ComponentPage componentPage) throws PageException {
if(interfaceCollection==null || interfaceCollection.lastUpdate()<=componentPage.lastCheck()) return;
Iterator it = interfaceCollection.getUdfs().entrySet().iterator();
Map.Entry entry;
UDFPlus iUdf,cUdf;
FunctionArgument[] iFA,cFA;
while(it.hasNext()){
entry=(Entry) it.next();
iUdf=(UDFPlus) entry.getValue();
cUdf=(UDFPlus) _udfs.get(entry.getKey());
// UDF does not exist
if(cUdf==null ) {
throw new ExpressionException(
"component ["+componentPage.getPageSource().getDisplayPath()+
"] does not implement the function ["+iUdf.toString().toLowerCase()+"] of the interface ["+
iUdf.getPageSource().getDisplayPath()+"]");
}
iFA=iUdf.getFunctionArguments();
cFA=cUdf.getFunctionArguments();
// access
if(cUdf.getAccess()>Component.ACCESS_PUBLIC){
throw new ExpressionException( _getErrorMessage(cUdf,iUdf),
"access ["+ComponentUtil.toStringAccess(cUdf.getAccess())+"] has to be at least [public]");
}
// return type
if(iUdf.getReturnType()!=cUdf.getReturnType()){
throw new ExpressionException( _getErrorMessage(cUdf,iUdf),
"return type ["+cUdf.getReturnTypeAsString()+"] does not match interface function return type ["+iUdf.getReturnTypeAsString()+"]");
}
// none base types
if(iUdf.getReturnType()==CFTypes.TYPE_UNKNOW && !iUdf.getReturnTypeAsString().equalsIgnoreCase(cUdf.getReturnTypeAsString())) {
throw new ExpressionException( _getErrorMessage(cUdf,iUdf),
"return type ["+cUdf.getReturnTypeAsString()+"] does not match interface function return type ["+iUdf.getReturnTypeAsString()+"]");
}
// output
if(iUdf.getOutput()!=cUdf.getOutput()){
throw new ExpressionException( _getErrorMessage(cUdf,iUdf),
"output does not match interface function output definition");
}
// arguments