01: /*
02: * Copyright 2006 Luca Garulli (luca.garulli@assetdata.it)
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.romaframework.aspect.i18n;
18:
19: import java.text.DateFormat;
20: import java.util.Locale;
21:
22: import org.romaframework.core.aspect.Aspect;
23: import org.romaframework.core.schema.SchemaObject;
24:
25: /**
26: * I18N Aspect behavior interface.
27: *
28: * @author Luca Garulli (luca.garulli@assetdata.it)
29: */
30: public interface I18NAspect extends Aspect {
31: public static final String ASPECT_NAME = "i18n";
32: public static final String VARNAME_PREFIX = "$";
33: public static final String CONTEXT_SEPARATOR = ".";
34: public static final String DEFAULT_VALUE_KEY = "$content";
35:
36: public String getLabel(SchemaObject iObject, String iElementName,
37: String iElementLabel);
38:
39: public DateFormat getDateFormat();
40:
41: public DateFormat getDateTimeFormat();
42:
43: public DateFormat getDateTimeFormat(Locale iLocale);
44:
45: public DateFormat getTimeFormat();
46:
47: public DateFormat getTimeFormat(Locale iLocale);
48:
49: public DateFormat getDateFormat(Locale iLocale);
50:
51: public String resolveString(Class<?> iObjectClass, String iText,
52: Object... iArgs);
53:
54: public String resolveString(String iText, Object... iArgs);
55:
56: public String getString(String iText);
57:
58: public String getString(String iText, Locale iLocale);
59: }
|