[Yanel-commits] rev 57775 - public/yanel/contributions/realms/konakart-yanel-realm/res-types/product/src/java/org/wyona/yanel/resources/konakart/product
michi at wyona.com
michi at wyona.com
Mon Apr 11 11:14:27 CEST 2011
Author: michi
Date: 2011-04-11 11:14:27 +0200 (Mon, 11 Apr 2011)
New Revision: 57775
Modified:
public/yanel/contributions/realms/konakart-yanel-realm/res-types/product/src/java/org/wyona/yanel/resources/konakart/product/KonakartProductSOAPInfResource.java
Log:
annotations added
Modified: public/yanel/contributions/realms/konakart-yanel-realm/res-types/product/src/java/org/wyona/yanel/resources/konakart/product/KonakartProductSOAPInfResource.java
===================================================================
--- public/yanel/contributions/realms/konakart-yanel-realm/res-types/product/src/java/org/wyona/yanel/resources/konakart/product/KonakartProductSOAPInfResource.java 2011-04-11 09:03:34 UTC (rev 57774)
+++ public/yanel/contributions/realms/konakart-yanel-realm/res-types/product/src/java/org/wyona/yanel/resources/konakart/product/KonakartProductSOAPInfResource.java 2011-04-11 09:14:27 UTC (rev 57775)
@@ -43,9 +43,9 @@
import javax.servlet.http.HttpServletResponse;
/**
- * A simple Resource which extends BasicXMLResource
+ * A product
*/
-public class KonakartProductSOAPInfResource extends BasicXMLResource {
+public class KonakartProductSOAPInfResource extends BasicXMLResource implements org.wyona.yanel.core.api.attributes.AnnotatableV1 {
private static Logger log = Logger.getLogger(KonakartProductSOAPInfResource.class);
@@ -292,4 +292,38 @@
return false;
}
}
+
+ /**
+ * @see org.wyona.yanel.core.api.attributes.AnnotatableV1#getAnnotations()
+ */
+ public String[] getAnnotations() throws Exception {
+ SharedResource shared = new SharedResource();
+ KKEngIf kkEngine = shared.getKonakartEngineImpl();
+ int languageId = shared.getLanguageId(getContentLanguage());
+ int productID = getProductID(kkEngine);
+ ProductIf product = kkEngine.getProduct(null, productID, languageId);
+ String[] annotations = {"shop", product.getName()};
+ return annotations;
+ }
+
+ /**
+ * @see org.wyona.yanel.core.api.attributes.AnnotatableV1#clearAllAnnotations()
+ */
+ public void clearAllAnnotations() throws Exception {
+ log.warn("No implemented yet!");
+ }
+
+ /**
+ * @see org.wyona.yanel.core.api.attributes.AnnotatableV1#removeAnnotation(String)
+ */
+ public void removeAnnotation(String name) throws Exception {
+ log.warn("No implemented yet!");
+ }
+
+ /**
+ * @see org.wyona.yanel.core.api.attributes.AnnotatableV1#setAnnotation(String)
+ */
+ public void setAnnotation(String name) throws Exception {
+ log.warn("No implemented yet!");
+ }
}
More information about the Yanel-commits
mailing list