Voting Tool: Unterschied zwischen den Versionen
Aus Java Student User Group Austria - Java + JVM in Wien Österreich / Vienna Austria
(→Protocol) |
|||
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 31: | Zeile 31: | ||
* Anonym | * Anonym | ||
+ | ** View Topics | ||
** Register | ** Register | ||
− | |||
** Login | ** Login | ||
* Member | * Member | ||
** Logout | ** Logout | ||
− | ** | + | ** Vote |
− | ** | + | ** Unvote |
− | ** | + | ** Request Talk |
− | ** | + | ** Offer Talk |
− | ** | + | ** Join Talk |
− | * Admin | + | * ''Admin'' |
** Edit Topic | ** Edit Topic | ||
Zeile 52: | Zeile 52: | ||
* GiveVote | * GiveVote | ||
* RevokeVote | * RevokeVote | ||
− | * | + | * RequestTalk |
− | * | + | * OfferTalk |
− | * | + | * JoinTalk |
== Valueobjects== | == Valueobjects== | ||
− | * | + | * TalkEntity |
** id: long | ** id: long | ||
** createdOn: timestamp | ** createdOn: timestamp | ||
Zeile 65: | Zeile 65: | ||
** votes: Vote[] | ** votes: Vote[] | ||
** tags: Tag[] | ** tags: Tag[] | ||
− | ** | + | ** detail: String |
+ | ** link: String // LUXURY // about topic itself | ||
+ | ** thumbnail: image // LUXURY | ||
** state: Enum {need | offer | next | past} | ** state: Enum {need | offer | next | past} | ||
** attribute1: String // attributes are state depending (?) | ** attribute1: String // attributes are state depending (?) | ||
Zeile 77: | Zeile 79: | ||
** createdOn: timestamp | ** createdOn: timestamp | ||
− | * UserEntity | + | * <span style="text-decoration:line-through;">UserEntity</span> |
** id: long | ** id: long | ||
** createdOn: timestamp | ** createdOn: timestamp | ||
Zeile 91: | Zeile 93: | ||
==Protocol== | ==Protocol== | ||
− | |||
− | |||
− | |||
* describes passed json/xml dataformats | * describes passed json/xml dataformats | ||
* mimetypes: | * mimetypes: | ||
** application/json | ** application/json | ||
** application/xml | ** application/xml | ||
+ | |||
+ | ===Overview=== | ||
+ | |||
+ | * Request | ||
+ | ** Head | ||
+ | *** Message Version; e.g. "0.1" | ||
+ | *** Message Code (unique for this request/response); e.g. "7" | ||
+ | *** Status Code | ||
+ | ** Body | ||
+ | *** ... | ||
+ | |||
+ | ===Talk=== | ||
+ | |||
+ | GET: /users; response: | ||
+ | |||
+ | <code> | ||
+ | [ | ||
+ | { | ||
+ | Id: 1, | ||
+ | Username: "foo" | ||
+ | }, | ||
+ | { | ||
+ | Id: 2, | ||
+ | Username: "bar" | ||
+ | } | ||
+ | ] | ||
+ | </code> | ||
== REST == | == REST == | ||
− | * / | + | * /session ... von REST vordefined |
− | ** GET: X | + | ** GET: X |
** PUT: X | ** PUT: X | ||
− | ** POST: login | + | ** POST: login |
− | ** DELETE: logout | + | ** DELETE: logout |
* /users | * /users | ||
− | ** GET: list all | + | ** GET: list all users |
** PUT: X | ** PUT: X | ||
** POST: register new user | ** POST: register new user | ||
** DELETE: X | ** DELETE: X | ||
− | * / | + | * /talks |
− | ** GET: list all | + | ** GET: list all talks |
− | ** PUT: | + | ** PUT: X |
− | ** POST: | + | ** POST: new talk |
− | ** DELETE: X (delete | + | ** DELETE: X |
− | * | + | * /talks/{talkId} |
− | + | ** GET: X (evtl: display talk) | |
+ | ** PUT: X | ||
+ | ** POST: X | ||
+ | ** DELETE: X (admin: delete talk) | ||
+ | * /talks/{talkId}/speakers | ||
** GET: X | ** GET: X | ||
** PUT: X | ** PUT: X | ||
− | ** POST: | + | ** POST: join that talk |
− | ** | + | ** DELETE: delete yourself |
− | + | * /talks/{talkId}/vote | |
+ | ** GET: X (evtl: returned true/false if yet voted) | ||
+ | ** PUT: X | ||
+ | ** POST: add vote | ||
+ | ** DELETE: unvote | ||
== Service API == | == Service API == |
Aktuelle Version vom 23. März 2009, 17:12 Uhr
This site contains a short overview of the JSUG Voting Tool hosted at googlecode. Its aim is to provide an easy way figuring out which topics are preferred by the members.
Inhaltsverzeichnis
General
Technologies used
- GWT 1.5.3
- RESTful Webservices
- PHP 5
Access Sourcecode
You can check out the full source code by:
# anonymous read-only access: svn checkout http://jsugvoting.googlecode.com/svn/ jsugvoting-read-only # project members only: svn checkout https://jsugvoting.googlecode.com/svn/trunk/ jsugvoting --username <your_name>
Technical Documentation
... kind of ...
Usecases
- Anonym
- View Topics
- Register
- Login
- Member
- Logout
- Vote
- Unvote
- Request Talk
- Offer Talk
- Join Talk
- Admin
- Edit Topic
Commands/Events
- ??? ReloadData
- Register
- Login
- Logout
- GiveVote
- RevokeVote
- RequestTalk
- OfferTalk
- JoinTalk
Valueobjects
- TalkEntity
- id: long
- createdOn: timestamp
- createdBy: User
- title: String
- votes: Vote[]
- tags: Tag[]
- detail: String
- link: String // LUXURY // about topic itself
- thumbnail: image // LUXURY
- state: Enum {need | offer | next | past}
- attribute1: String // attributes are state depending (?)
- attribute2: String
- attribute3: String
- attribute4: String
- VoteEntity
- topicId: long
- userId: long
- createdOn: timestamp
- UserEntity
- id: long
- createdOn: timestamp
- username: String
- password: String // SHA-1 encrypted
- email: String
- Tag
- id: long
- word: String
Protocol
- describes passed json/xml dataformats
- mimetypes:
- application/json
- application/xml
Overview
- Request
- Head
- Message Version; e.g. "0.1"
- Message Code (unique for this request/response); e.g. "7"
- Status Code
- Body
- ...
- Head
Talk
GET: /users; response:
[ { Id: 1, Username: "foo" }, { Id: 2, Username: "bar" } ]
REST
- /session ... von REST vordefined
- GET: X
- PUT: X
- POST: login
- DELETE: logout
- /users
- GET: list all users
- PUT: X
- POST: register new user
- DELETE: X
- /talks
- GET: list all talks
- PUT: X
- POST: new talk
- DELETE: X
- /talks/{talkId}
- GET: X (evtl: display talk)
- PUT: X
- POST: X
- DELETE: X (admin: delete talk)
- /talks/{talkId}/speakers
- GET: X
- PUT: X
- POST: join that talk
- DELETE: delete yourself
- /talks/{talkId}/vote
- GET: X (evtl: returned true/false if yet voted)
- PUT: X
- POST: add vote
- DELETE: unvote
Service API
- AuthService
- login(username: String, password: String): boolean
- logout(): void
- register(username: String, password: String, email: String): boolean
- TopicsService
- ...