# HG changeset patch # User Ingo Weinzierl # Date 1297870817 0 # Node ID 6aeb4072eeb48779733597337ddd84e397cc5a16 # Parent fc616c192902780f7796d0f1cc9c4f889da50295 Added interfaces and a stub implementation of an artifact service the should provide the methods for communicating with the artifact server. flys-client/trunk@1320 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r fc616c192902 -r 6aeb4072eeb4 flys-client/ChangeLog --- a/flys-client/ChangeLog Wed Feb 16 15:35:17 2011 +0000 +++ b/flys-client/ChangeLog Wed Feb 16 15:40:17 2011 +0000 @@ -1,3 +1,17 @@ +2011-02-16 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java, + src/main/java/de/intevation/flys/client/client/services/ArtifactServiceAsync.java, + src/main/java/de/intevation/flys/client/client/services/ArtifactService.java: + New. Interface descriptions and the server implementation of an artifact + service that provides basic methods for working with artifacts. + + NOTE: The implementation is currently just a stub. The artifact creation + needs to be implemented. + + * src/main/webapp/WEB-INF/web.xml: Added a servlet for the artifact + interface. + 2011-02-16 Ingo Weinzierl * src/main/java/de/intevation/flys/client/shared/model/Artifact.java: diff -r fc616c192902 -r 6aeb4072eeb4 flys-client/src/main/java/de/intevation/flys/client/client/services/ArtifactService.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/ArtifactService.java Wed Feb 16 15:40:17 2011 +0000 @@ -0,0 +1,26 @@ +package de.intevation.flys.client.client.services; + +import com.google.gwt.user.client.rpc.RemoteService; +import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; + +import de.intevation.flys.client.shared.model.Artifact; + +/** + * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, + * ADVANCE and OUT. + * + * @author Ingo Weinzierl + */ +@RemoteServiceRelativePath("artifact") +public interface ArtifactService extends RemoteService { + + /** + * This method creates a new artifact based on the given factory. + * + * @param factory The factory that should be used for the artifact creation. + * + * @return the new artifact. + */ + public Artifact create(String factory); +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc616c192902 -r 6aeb4072eeb4 flys-client/src/main/java/de/intevation/flys/client/client/services/ArtifactServiceAsync.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/services/ArtifactServiceAsync.java Wed Feb 16 15:40:17 2011 +0000 @@ -0,0 +1,18 @@ +package de.intevation.flys.client.client.services; + +import com.google.gwt.user.client.rpc.AsyncCallback; + +import de.intevation.flys.client.shared.model.Artifact; + + +/** + * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, + * ADVANCE and OUT. + * + * @author Ingo Weinzierl + */ +public interface ArtifactServiceAsync { + + public void create(String factory, AsyncCallback callback); +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc616c192902 -r 6aeb4072eeb4 flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactServiceImpl.java Wed Feb 16 15:40:17 2011 +0000 @@ -0,0 +1,33 @@ +package de.intevation.flys.client.server; + +import org.w3c.dom.Document; + +import com.google.gwt.user.server.rpc.RemoteServiceServlet; + +import com.google.gwt.core.client.GWT; + +import de.intevation.artifacts.common.utils.ClientProtocolUtils; +import de.intevation.artifacts.common.utils.XMLUtils; + +import de.intevation.flys.client.shared.model.Artifact; +import de.intevation.flys.client.client.services.ArtifactService; + + +/** + * This interface provides artifact specific services as CREATE, DESCRIBE, FEED, + * ADVANCE and OUT. + * + * @author Ingo Weinzierl + */ +public class ArtifactServiceImpl +extends RemoteServiceServlet +implements ArtifactService +{ + public Artifact create(String factory) { + Document create = ClientProtocolUtils.newCreateDocument(factory); + + // TODO Implement the artifact creation. + return null; + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : diff -r fc616c192902 -r 6aeb4072eeb4 flys-client/src/main/webapp/WEB-INF/web.xml --- a/flys-client/src/main/webapp/WEB-INF/web.xml Wed Feb 16 15:35:17 2011 +0000 +++ b/flys-client/src/main/webapp/WEB-INF/web.xml Wed Feb 16 15:40:17 2011 +0000 @@ -16,6 +16,16 @@ /flys/user + + artifact + de.intevation.flys.client.server.ArtifactServiceImpl + + + + artifact + /flys/artifact + + FLYS.html