You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/07/19 12:04:06 UTC
svn commit: r557545 - in /lenya/trunk/src:
impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
java/org/apache/lenya/cms/publication/ResourceType.java
Author: andreas
Date: Thu Jul 19 03:04:02 2007
New Revision: 557545
URL: http://svn.apache.org/viewvc?view=rev&rev=557545
Log:
Removed ResourceType.getLabel(). Can be handled with i18n in a more flexible way.
Modified:
lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java
Modified: lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java?view=diff&rev=557545&r1=557544&r2=557545
==============================================================================
--- lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java (original)
+++ lenya/trunk/src/impl/java/org/apache/lenya/cms/publication/ResourceTypeImpl.java Thu Jul 19 03:04:02 2007
@@ -52,7 +52,6 @@
protected static final String ATTRIBUTE_LANGUAGE = "language";
protected static final String EXPIRES_ELEMENT = "expires";
protected static final String SECONDS_ATTRIBUTE = "seconds";
- protected static final String ELEMENT_LABEL = "label";
/**
* The default sample name.
@@ -108,11 +107,6 @@
this.expires = expiresConf.getAttributeAsLong(SECONDS_ATTRIBUTE);
}
- Configuration labelConf = config.getChild(ELEMENT_LABEL, false);
- if (labelConf != null) {
- this.label = labelConf.getValue();
- }
-
} catch (Exception e) {
throw new ConfigurationException("Configuring resource type failed: ", e);
}
@@ -239,17 +233,4 @@
}
- private String label;
-
- public String getLabel() {
- if (this.label == null) {
- this.label = getName();
- }
- return this.label;
- }
-
- public void setLabel(String label) {
- this.label = label;
- }
-
}
Modified: lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java
URL: http://svn.apache.org/viewvc/lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java?view=diff&rev=557545&r1=557544&r2=557545
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/publication/ResourceType.java Thu Jul 19 03:04:02 2007
@@ -48,6 +48,12 @@
String ROLE = ResourceType.class.getName();
/**
+ * Prefix for translating the resource type name, e.g.
+ * <i18n:text>resourceType-<jx:out value="${resourceType.getName()}"/></i18n:text>
+ */
+ String I18N_PREFIX = "resourceType-";
+
+ /**
* Returns the date at which point the requested resource is considered expired
* @return a string in RFC 1123 date format
*/
@@ -101,13 +107,4 @@
*/
String getFormatURI(String format);
- /**
- * @return The label of the resource type.
- */
- String getLabel();
-
- /**
- * @param label The label of the resource type.
- */
- void setLabel(String label);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org