New research and technology page

* Added legacyworlds-server-beans-technologies Maven module, including
the player-level DAO and controller.

* Added session classes to carry technology information, modified web
client session façade accordingly

* Various changes to common UI elements (forms, lists, etc...) so the
start and end of some element can be drawn separately

* Added controller, templates and JavaScript for research page
This commit is contained in:
Emmanuel BENOîT 2012-04-07 13:06:03 +02:00
parent 154f215e24
commit 6dcd59d7bc
45 changed files with 2314 additions and 178 deletions
legacyworlds-web-beans/src/main/java/com/deepclone/lw/web/csess

View file

@ -17,6 +17,10 @@ import com.deepclone.lw.cmd.player.elist.*;
import com.deepclone.lw.cmd.player.fleets.*;
import com.deepclone.lw.cmd.player.gdata.*;
import com.deepclone.lw.cmd.player.planets.*;
import com.deepclone.lw.cmd.player.tech.GetResearchCommand;
import com.deepclone.lw.cmd.player.tech.GetResearchResponse;
import com.deepclone.lw.cmd.player.tech.ImplementTechCommand;
import com.deepclone.lw.cmd.player.tech.UpdateResearchPrioritiesCommand;
import com.deepclone.lw.cmd.player.msgs.*;
import com.deepclone.lw.session.Command;
import com.deepclone.lw.session.SessionException;
@ -78,10 +82,41 @@ public class PlayerSession
}
public EmpireResponse implementTechnology( int technology )
/**
* Request research information
*
* @return the research information response
*/
public GetResearchResponse getResearch( )
throws SessionException , SessionServerException , SessionMaintenanceException
{
return (EmpireResponse) this.execute( new ImplementTechCommand( technology ) );
return (GetResearchResponse) this.execute( new GetResearchCommand( ) );
}
/**
* Update research priorities
*
* @param priorities
* the map of research identifiers to priority values
*/
public void updateResearchPriorities( Map< String , Integer > priorities )
throws SessionException , SessionServerException , SessionMaintenanceException
{
this.execute( new UpdateResearchPrioritiesCommand( priorities ) );
}
/**
* Implement a technology
*
* @param technology
* the technology's identifier
*/
public void implementTechnology( String technology )
throws SessionException , SessionServerException , SessionMaintenanceException
{
this.execute( new ImplementTechCommand( technology ) );
}
@ -618,4 +653,5 @@ public class PlayerSession
{
return (PostCommentResponse) this.execute( new PostCommentCommand( bugId , comment ) );
}
}