Add method to generate a client token.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 May 2009 16:33:19 +0000 (18:33 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Sat, 23 May 2009 16:33:19 +0000 (18:33 +0200)
src/net/pterodactylus/jsite/core/RequestManager.java

index df7028f..831c9b3 100644 (file)
@@ -129,6 +129,19 @@ public class RequestManager implements NodeListener {
        }
 
        /**
+        * Generates a client token for the given project.
+        *
+        * @param project
+        *            The project to generate a client token for
+        * @return The generated client token
+        */
+       public String generateClientToken(Project project) {
+               String clientToken = project.getId() + "." + System.currentTimeMillis();
+               clientToken += "." + clientToken.hashCode();
+               return clientToken;
+       }
+
+       /**
         * Wraps the requests of the FCP API into jSite requests.
         *
         * @param requests