01: /*
02:
03: This software is OSI Certified Open Source Software.
04: OSI Certified is a certification mark of the Open Source Initiative.
05:
06: The license (Mozilla version 1.0) can be read at the MMBase site.
07: See http://www.MMBase.org/license
08:
09: */
10: package org.mmbase.framework.basic;
11:
12: import java.util.*;
13:
14: import org.mmbase.framework.FrameworkException;
15: import org.mmbase.util.functions.*;
16:
17: /**
18: * Responsible for the proper handling of urls within the basic framework {@link BasicFramework}.
19: * You should implement UrlConverter if you want to create and resolve your own
20: * userfriendly links within {@link BasicFramework}
21: *.
22: * You can configure several UrlConverters in 'framework.xml'.
23: *
24: * They will be chained one after another.
25:
26: * @author Michiel Meeuwissen
27: * @version $Id: UrlConverter.java,v 1.5 2008/02/22 14:05:57 michiel Exp $
28: * @since MMBase-1.9
29: */
30: public interface UrlConverter {
31:
32: Parameter[] getParameterDefinition();
33:
34: /**
35: * See {@link Framework#getUrl(String, Map, Parameters, boolean)}.
36: * But it can also return <code>null</code> which mean, 'I don't know.'
37: */
38: String getUrl(String path, Map<String, Object> parameters,
39: Parameters frameworkParameters, boolean escapeAmps)
40: throws FrameworkException;
41:
42: String getProcessUrl(String path, Map<String, Object> parameters,
43: Parameters frameworkParameters, boolean escapeAmps)
44: throws FrameworkException;
45:
46: /**
47: * See {@link Framework#geInternaltUrl(String, Map, Parameters)}.
48: * But it can also return <code>null</code> which mean, 'I don't know'.
49: */
50: String getInternalUrl(String path, Map<String, Object> params,
51: Parameters frameworkParameters) throws FrameworkException;
52:
53: }
|