You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2017/10/03 11:59:02 UTC

[isis] 19/24: ISIS-1742: deletes EventSerializer

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch dev/2.0.0/ISIS-1742-remove-deprecations
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 5459edbbd159693223326e928760a80d5ccfb6b8
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Oct 3 09:43:16 2017 +0100

    ISIS-1742: deletes EventSerializer
---
 .../applib/services/publish/EventMetadata.java     |  2 -
 .../applib/services/publish/EventSerializer.java   | 62 ----------------------
 2 files changed, 64 deletions(-)

diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
index b159e02..e9d79bc 100644
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventMetadata.java
@@ -31,8 +31,6 @@ import org.apache.isis.applib.services.bookmark.Bookmark;
  * 
  * <p>
  * This is a class rather than an interface so that it may be easily extended in the future.
-
- * @see EventPayload
  */
 public class EventMetadata {
     
diff --git a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java b/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java
deleted file mode 100644
index 802ede0..0000000
--- a/core/applib/src/main/java/org/apache/isis/applib/services/publish/EventSerializer.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *        http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.isis.applib.services.publish;
-
-import org.w3c.dom.Document;
-
-import org.apache.isis.applib.annotation.Programmatic;
-
-public interface EventSerializer {
-
-    /**
-     * Combines the {@link EventMetadata metadata} and the {@link EventPayload payload}
-     * into some serialized form (such as JSON, XML or a string) that can then be published.
-     * 
-     * <p>
-     * This method returns an object for maximum flexibility, which is then
-     * handed off to the {@link PublishingService}.  It's important to make sure that the
-     * publishing service is able to handle the serialized form.  Strings are a good
-     * lowest common denominator, but in some cases are type-safe equivalent, such as a
-     * {@link Document w3c DOM Document} or a JSON node might be passed instead.
-     *  
-     * @return a string, some JSON, some XML or some other standard serialized form. 
-     */
-    public Object serialize(EventMetadata metadata, EventPayload payload);
-
-    /**
-     * Used as a fallback if no other implementation is defined.
-     */
-    public static class Simple implements EventSerializer {
-
-        @Programmatic
-        @Override
-        public Object serialize(EventMetadata metadata, EventPayload payload) {
-            return "PUBLISHED:" +
-            		"\n  metadata:" + 
-                    "\n    id       :" + metadata.getId() + 
-                    "\n    eventType:" + metadata.getEventType() + 
-                    "\n    user     :" + metadata.getUser() + 
-                    "\n    timestamp:" + metadata.getTimestamp() + 
-                    "\n  payload:" +
-                    "\n" + payload.toString();
-        }
-    }
-
-}

-- 
To stop receiving notification emails like this one, please contact
"commits@isis.apache.org" <co...@isis.apache.org>.