Project: * Clean-up (Eclipse cruft, unused files, etc...) * Git-specific changes * Maven POMs clean-up and changes for the build system * Version set to 1.0.0-0 in the development branches * Maven plug-ins updated to latest versions * Very partial dev. documentation added

This commit is contained in:
Emmanuel BENOîT 2011-12-09 08:07:33 +01:00
parent c74e30d5ba
commit 0665a760de
1439 changed files with 1020 additions and 1649 deletions

View file

@ -0,0 +1,179 @@
package com.deepclone.lw.beans.bt;
import java.util.Iterator;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.deepclone.lw.cmd.admin.adata.Administrator;
import com.deepclone.lw.cmd.admin.bt.BugsSummaryResponse;
import com.deepclone.lw.cmd.admin.bt.GetSnapshotResponse;
import com.deepclone.lw.cmd.admin.bt.ListBugsResponse;
import com.deepclone.lw.cmd.admin.bt.MergeError;
import com.deepclone.lw.cmd.admin.bt.MergeReportsResponse;
import com.deepclone.lw.cmd.admin.bt.PostCommentResponse;
import com.deepclone.lw.cmd.admin.bt.ReportBugResponse;
import com.deepclone.lw.cmd.admin.bt.ViewBugResponse;
import com.deepclone.lw.cmd.bt.data.BugEvent;
import com.deepclone.lw.cmd.bt.data.BugEventType;
import com.deepclone.lw.cmd.bt.data.BugReport;
import com.deepclone.lw.cmd.bt.data.BugStatus;
import com.deepclone.lw.interfaces.bt.AdminBugs;
import com.deepclone.lw.interfaces.bt.BugsDAO;
@Transactional
public class AdminBugsBean
implements AdminBugs
{
private BugsDAO bugsDao;
@Autowired( required = true )
public void setBugsDao( BugsDAO bugsDao )
{
this.bugsDao = bugsDao;
}
private List< BugEvent > getBugEvents( long bugId )
{
List< BugEvent > events = this.bugsDao.getEvents( bugId );
Iterator< BugEvent > it = events.iterator( );
BugStatus status = BugStatus.PENDING;
boolean pub = false;
while ( it.hasNext( ) ) {
BugEvent event = it.next( );
if ( event.getType( ) == BugEventType.STATUS ) {
if ( event.getStatus( ) == status ) {
it.remove( );
} else {
status = event.getStatus( );
}
} else if ( event.getType( ) == BugEventType.VISIBILITY ) {
if ( event.getVisible( ) == pub ) {
it.remove( );
} else {
pub = event.getVisible( );
}
}
}
return events;
}
@Override
public BugsSummaryResponse getSummary( Administrator admin )
{
long pending = this.bugsDao.countReports( admin , BugStatus.PENDING , false );
long open = this.bugsDao.countReports( admin , BugStatus.OPEN , false );
long own = this.bugsDao.countReports( admin , null , true );
long updated = this.bugsDao.countUpdatedReports( admin );
long total = this.bugsDao.countReports( admin , null , false );
return new BugsSummaryResponse( admin , pending , open , own , updated , total );
}
@Override
public ListBugsResponse getBugs( Administrator admin , BugStatus status , boolean ownOnly , long first , int count )
{
long nBugs = this.bugsDao.countReports( admin , status , ownOnly );
List< BugReport > bugs = this.bugsDao.getReports( admin , status , ownOnly , first , count );
return new ListBugsResponse( admin , status , ownOnly , first , count , nBugs , bugs );
}
@Override
public ReportBugResponse postReport( Administrator admin , String title , String contents , boolean publicReport )
{
long bugId = this.bugsDao.postReport( admin , title , contents , publicReport );
return new ReportBugResponse( admin , bugId );
}
@Override
public ViewBugResponse getReport( Administrator admin , long bugId )
{
BugReport report = this.bugsDao.getReport( admin , bugId );
if ( report == null ) {
return new ViewBugResponse( admin , false );
}
return new ViewBugResponse( admin , report , this.getBugEvents( bugId ) );
}
@Override
public PostCommentResponse postComment( Administrator admin , long bugId , String comment , boolean publicComment )
{
this.bugsDao.postComment( admin , bugId , comment , publicComment );
return new PostCommentResponse( admin );
}
@Override
public void moderateComment( Administrator admin , long commentId , boolean validation )
{
if ( validation ) {
this.bugsDao.showComment( admin , commentId );
} else {
this.bugsDao.deleteComment( admin , commentId );
}
}
@Override
public void validateReport( Administrator admin , long bugId , BugStatus status , boolean publicReport ,
int credits , boolean snapshot )
{
this.bugsDao.validateReport( admin , bugId , status , publicReport , credits , snapshot );
}
@Override
public void setStatus( Administrator admin , long bugId , BugStatus status )
{
this.bugsDao.setStatus( admin , bugId , status );
}
@Override
public void toggleVisibility( Administrator admin , long bugId )
{
this.bugsDao.toggleVisibility( admin , bugId );
}
@Override
public MergeReportsResponse mergeReports( Administrator admin , long id , long mergeId )
{
int errCode = this.bugsDao.mergeReports( admin , id , mergeId );
if ( errCode == 0 ) {
return new MergeReportsResponse( admin );
}
BugReport report = this.bugsDao.getReport( admin , id );
if ( report == null ) {
return new MergeReportsResponse( admin , false );
}
return new MergeReportsResponse( admin , report , this.getBugEvents( id ) ,
MergeError.values( )[ errCode - 1 ] , mergeId );
}
@Override
public GetSnapshotResponse getSnapshot( Administrator admin , long bugId )
{
String snapshot = this.bugsDao.getSnapshot( bugId );
if ( snapshot == null ) {
return new GetSnapshotResponse( admin , false );
}
return new GetSnapshotResponse( admin , snapshot );
}
}

View file

@ -0,0 +1,395 @@
package com.deepclone.lw.beans.bt;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.cmd.admin.adata.Administrator;
import com.deepclone.lw.cmd.bt.data.*;
import com.deepclone.lw.interfaces.bt.BugsDAO;
import com.deepclone.lw.utils.StoredProc;
public class BugsDAOBean
implements BugsDAO
{
private SimpleJdbcTemplate dTemplate;
private final RowMapper< BugReport > mBugReport;
private final RowMapper< BugEvent > mBugEvent;
private final RowMapper< String > mString;
private StoredProc fPostUserReport;
private StoredProc fPostAdminReport;
private StoredProc fPostUserComment;
private StoredProc fPostAdminComment;
private StoredProc fShowComment;
private StoredProc fDeleteComment;
private StoredProc fValidateReport;
private StoredProc fSetStatus;
private StoredProc fToggleVisibility;
private StoredProc fMerge;
public BugsDAOBean( )
{
this.mBugReport = new RowMapper< BugReport >( ) {
@Override
public BugReport mapRow( ResultSet rs , int rowNum )
throws SQLException
{
BugSubmitter sub;
BugReport br = new BugReport( );
br.setReportId( rs.getLong( "bug_report_id" ) );
br.setTitle( rs.getString( "title" ) );
br.setPosted( rs.getTimestamp( "posted" ) );
br.setVisible( rs.getBoolean( "visible" ) );
br.setStatus( BugStatus.valueOf( rs.getString( "status" ) ) );
br.setLastUpdate( rs.getTimestamp( "last_update" ) );
br.setUpdated( rs.getBoolean( "updated" ) );
sub = new BugSubmitter( );
sub.setAdmin( rs.getBoolean( "initial_submitter_admin" ) );
sub.setName( rs.getString( "initial_submitter_name" ) );
sub.setUserId( (Integer) rs.getObject( "initial_submitter_uid" ) );
br.setInitialSubmitter( sub );
sub = new BugSubmitter( );
sub.setAdmin( rs.getBoolean( "last_submitter_admin" ) );
sub.setName( rs.getString( "last_submitter_name" ) );
sub.setUserId( (Integer) rs.getObject( "last_submitter_uid" ) );
br.setLatestSubmitter( sub );
return br;
}
};
this.mBugEvent = new RowMapper< BugEvent >( ) {
@Override
public BugEvent mapRow( ResultSet rs , int rowNum )
throws SQLException
{
BugSubmitter sub;
BugEvent be = new BugEvent( );
be.setId( rs.getLong( "event_id" ) );
be.setType( BugEventType.valueOf( rs.getString( "event_type" ) ) );
be.setTimestamp( rs.getTimestamp( "event_timestamp" ) );
be.setTitle( rs.getString( "title" ) );
be.setContents( rs.getString( "contents" ) );
BugEventType type = be.getType( );
switch ( type ) {
case STATUS:
be.setStatus( BugStatus.valueOf( rs.getString( "status" ) ) );
break;
case COMMENT:
case VISIBILITY:
case INIT:
be.setVisible( rs.getBoolean( "visible" ) );
break;
case MERGE:
be.setMergedId( rs.getLong( "merged_report_id" ) );
break;
}
sub = new BugSubmitter( );
sub.setAdmin( rs.getBoolean( "submitter_admin" ) );
sub.setName( rs.getString( "submitter_name" ) );
sub.setUserId( (Integer) rs.getObject( "submitter_uid" ) );
be.setSubmitter( sub );
return be;
}
};
this.mString = new RowMapper< String >( ) {
@Override
public String mapRow( ResultSet rs , int rowNum )
throws SQLException
{
return rs.getString( 1 );
}
};
}
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
this.fPostUserReport = new StoredProc( dataSource , "bugs" , "post_player_report" );
this.fPostUserReport.addParameter( "empire_id" , Types.INTEGER );
this.fPostUserReport.addParameter( "title" , Types.VARCHAR );
this.fPostUserReport.addParameter( "description" , Types.VARCHAR );
this.fPostUserReport.addParameter( "extra" , Types.VARCHAR );
this.fPostUserReport.addOutput( "report_id" , Types.BIGINT );
this.fPostUserReport.addOutput( "group_id" , Types.BIGINT );
this.fPostAdminReport = new StoredProc( dataSource , "bugs" , "post_admin_report" );
this.fPostAdminReport.addParameter( "admin_id" , Types.INTEGER );
this.fPostAdminReport.addParameter( "title" , Types.VARCHAR );
this.fPostAdminReport.addParameter( "description" , Types.VARCHAR );
this.fPostAdminReport.addParameter( "public_report" , Types.BOOLEAN );
this.fPostAdminReport.addOutput( "report_id" , Types.BIGINT );
this.fPostAdminReport.addOutput( "group_id" , Types.BIGINT );
this.fPostUserComment = new StoredProc( dataSource , "bugs" , "post_player_comment" );
this.fPostUserComment.addParameter( "empire_id" , Types.INTEGER );
this.fPostUserComment.addParameter( "report_id" , Types.BIGINT );
this.fPostUserComment.addParameter( "comment" , Types.VARCHAR );
this.fPostAdminComment = new StoredProc( dataSource , "bugs" , "post_admin_comment" );
this.fPostAdminComment.addParameter( "admin_id" , Types.INTEGER );
this.fPostAdminComment.addParameter( "report_id" , Types.BIGINT );
this.fPostAdminComment.addParameter( "comment" , Types.VARCHAR );
this.fPostAdminComment.addParameter( "public_comment" , Types.BOOLEAN );
this.fShowComment = new StoredProc( dataSource , "bugs" , "show_comment" );
this.fShowComment.addParameter( "admin_id" , Types.INTEGER );
this.fShowComment.addParameter( "comment_id" , Types.BIGINT );
this.fDeleteComment = new StoredProc( dataSource , "bugs" , "delete_comment" );
this.fDeleteComment.addParameter( "admin_id" , Types.INTEGER );
this.fDeleteComment.addParameter( "comment_id" , Types.BIGINT );
this.fValidateReport = new StoredProc( dataSource , "bugs" , "validate_report" );
this.fValidateReport.addParameter( "admin_id" , Types.INTEGER );
this.fValidateReport.addParameter( "report_id" , Types.BIGINT );
this.fValidateReport.addParameter( "new_status" , "bug_status_type" );
this.fValidateReport.addParameter( "public_report" , Types.BOOLEAN );
this.fValidateReport.addParameter( "grant_credits" , Types.INTEGER );
this.fValidateReport.addParameter( "keep_snapshot" , Types.BOOLEAN );
this.fSetStatus = new StoredProc( dataSource , "bugs" , "set_report_status" );
this.fSetStatus.addParameter( "admin_id" , Types.INTEGER );
this.fSetStatus.addParameter( "report_id" , Types.BIGINT );
this.fSetStatus.addParameter( "new_status" , "bug_status_type" );
this.fToggleVisibility = new StoredProc( dataSource , "bugs" , "toggle_report_visibility" );
this.fToggleVisibility.addParameter( "admin_id" , Types.INTEGER );
this.fToggleVisibility.addParameter( "report_id" , Types.BIGINT );
this.fMerge = new StoredProc( dataSource , "bugs" , "merge_reports" );
this.fMerge.addParameter( "admin_id" , Types.INTEGER );
this.fMerge.addParameter( "report1_id" , Types.BIGINT );
this.fMerge.addParameter( "report2_id" , Types.BIGINT );
this.fMerge.addOutput( "err_code" , Types.INTEGER );
}
@Override
public long countReports( int empireId , BugStatus status , boolean ownOnly )
{
StringBuilder builder = new StringBuilder( );
List< Object > qData = new ArrayList< Object >( );
qData.add( (Integer) empireId );
builder.append( "SELECT count(*) FROM bugs.br_user_view WHERE empire_id = ?" );
this.addQueryParameters( builder , qData , status , ownOnly );
Object[] args = qData.toArray( );
return this.dTemplate.queryForLong( builder.toString( ) , args );
}
@Override
public long countReports( Administrator admin , BugStatus status , boolean ownOnly )
{
StringBuilder builder = new StringBuilder( );
List< Object > qData = new ArrayList< Object >( );
qData.add( (Integer) admin.getId( ) );
builder.append( "SELECT count(*) FROM bugs.br_admin_view WHERE administrator_id = ?" );
this.addQueryParameters( builder , qData , status , ownOnly );
Object[] args = qData.toArray( );
return this.dTemplate.queryForLong( builder.toString( ) , args );
}
@Override
public long countUpdatedReports( Administrator admin )
{
String sql = "SELECT count(*) FROM bugs.br_admin_view WHERE administrator_id = ? AND updated";
return this.dTemplate.queryForLong( sql , admin.getId( ) );
}
@Override
public List< BugReport > getReports( int empireId , BugStatus status , boolean ownOnly , long first , int count )
{
StringBuilder builder = new StringBuilder( ).append( "SELECT * FROM bugs.br_user_view WHERE empire_id = ?" );
List< Object > qData = new ArrayList< Object >( );
qData.add( (Integer) empireId );
this.addQueryParameters( builder , qData , status , ownOnly );
this.addWindowParameters( builder , qData , first , count );
Object[] args = qData.toArray( );
return this.dTemplate.query( builder.toString( ) , this.mBugReport , args );
}
@Override
public List< BugReport > getReports( Administrator admin , BugStatus status , boolean ownOnly , long first ,
int count )
{
StringBuilder builder = new StringBuilder( );
List< Object > qData = new ArrayList< Object >( );
qData.add( (Integer) admin.getId( ) );
builder.append( "SELECT * FROM bugs.br_admin_view WHERE administrator_id = ?" );
this.addQueryParameters( builder , qData , status , ownOnly );
this.addWindowParameters( builder , qData , first , count );
Object[] args = qData.toArray( );
return this.dTemplate.query( builder.toString( ) , this.mBugReport , args );
}
private void addQueryParameters( StringBuilder builder , List< Object > qData , BugStatus status , boolean ownOnly )
{
if ( status != null ) {
builder.append( " AND status = ?" );
qData.add( status.toString( ) );
}
if ( ownOnly ) {
builder.append( " AND own_report" );
}
}
private void addWindowParameters( StringBuilder builder , List< Object > qData , long first , int count )
{
builder.append( " ORDER BY last_update DESC , bug_report_id DESC OFFSET ? LIMIT ?" );
qData.add( (Long) first );
qData.add( (Integer) count );
}
@Override
public BugReport getReport( int empireId , long reportId )
{
return this.getReport( "player" , empireId , reportId );
}
@Override
public BugReport getReport( Administrator admin , long reportId )
{
return this.getReport( "admin" , admin.getId( ) , reportId );
}
private BugReport getReport( String viewerType , int viewerId , long reportId )
{
String sql = "SELECT * FROM bugs.read_" + viewerType + "_report( ? , ? )";
try {
return this.dTemplate.queryForObject( sql , this.mBugReport , viewerId , reportId );
} catch ( EmptyResultDataAccessException e ) {
return null;
}
}
@Override
public long postReport( int empireId , String title , String contents , String extra )
{
return (Long) this.fPostUserReport.execute( empireId , title , contents , extra ).get( "report_id" );
}
@Override
public long postReport( Administrator admin , String title , String contents , boolean publicReport )
{
return (Long) this.fPostAdminReport.execute( admin.getId( ) , title , contents , publicReport ).get(
"report_id" );
}
@Override
public void postComment( int empireId , long reportId , String comment )
{
this.fPostUserComment.execute( empireId , reportId , comment );
}
@Override
public void postComment( Administrator admin , long reportId , String comment , boolean publicComment )
{
this.fPostAdminComment.execute( admin.getId( ) , reportId , comment , publicComment );
}
@Override
public List< BugEvent > getEvents( long bugId )
{
String sql = "SELECT * FROM bugs.br_events WHERE bug_report_id = ?";
return this.dTemplate.query( sql , this.mBugEvent , bugId );
}
@Override
public void showComment( Administrator admin , long commentId )
{
this.fShowComment.execute( admin.getId( ) , commentId );
}
@Override
public void deleteComment( Administrator admin , long commentId )
{
this.fDeleteComment.execute( admin.getId( ) , commentId );
}
@Override
public void validateReport( Administrator admin , long bugId , BugStatus status , boolean publicReport ,
int credits , boolean snapshot )
{
this.fValidateReport.execute( admin.getId( ) , bugId , status.toString( ) , publicReport , credits , snapshot );
}
@Override
public void setStatus( Administrator admin , long bugId , BugStatus status )
{
this.fSetStatus.execute( admin.getId( ) , bugId , status.toString( ) );
}
@Override
public void toggleVisibility( Administrator admin , long bugId )
{
this.fToggleVisibility.execute( admin.getId( ) , bugId );
}
@Override
public int mergeReports( Administrator admin , long id , long mergeId )
{
return (Integer) this.fMerge.execute( admin.getId( ) , id , mergeId ).get( "err_code" );
}
@Override
public String getSnapshot( long bugId )
{
String sql = "SELECT account_status FROM bugs.account_status_data WHERE event_id = ?";
return this.dTemplate.queryForObject( sql , this.mString , bugId );
}
}

View file

@ -0,0 +1,240 @@
package com.deepclone.lw.beans.bt;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import com.deepclone.lw.beans.bt.esdata.*;
import com.deepclone.lw.interfaces.bt.EmpireSummary;
import com.thoughtworks.xstream.XStream;
public class EmpireSummaryBean
implements EmpireSummary
{
private SimpleJdbcTemplate dTemplate;
private final XStream xStream;
private final RowMapper< DebugInformation > mMainInfo;
private final RowMapper< ResearchInformation > mResearch;
private final RowMapper< PlanetInformation > mPlanet;
private final RowMapper< QueueItemInformation > mQueueItem;
private final RowMapper< BuildingsInformation > mBuildings;
private final RowMapper< FleetInformation > mFleet;
private final RowMapper< ShipsInformation > mShips;
public EmpireSummaryBean( )
{
this.xStream = new XStream( );
this.xStream.processAnnotations( new Class< ? >[] {
AccountInformation.class , AllianceInformation.class , BuildingsInformation.class ,
DebugInformation.class , EmpireInformation.class , FleetInformation.class , MovementInformation.class ,
PlanetInformation.class , QueueInformation.class , QueueItemInformation.class ,
ResearchInformation.class , ShipsInformation.class , SystemInformation.class
} );
this.mMainInfo = new RowMapper< DebugInformation >( ) {
@Override
public DebugInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
DebugInformation di = new DebugInformation( );
di.getSystem( ).setNextTick( rs.getLong( "next_tick" ) );
di.getSystem( ).setCurrentTick( (Long) rs.getObject( "current_tick" ) );
di.getAccount( ).setId( rs.getInt( "account_id" ) );
di.getAccount( ).setAddress( rs.getString( "account_address" ) );
di.getAccount( ).setGameCredits( rs.getInt( "game_credits" ) );
di.getAccount( ).setStatus( rs.getString( "account_status" ) );
di.getAccount( ).setLanguage( rs.getString( "account_language" ) );
di.getEmpire( ).setId( rs.getInt( "empire_id" ) );
di.getEmpire( ).setName( rs.getString( "empire_name" ) );
di.getEmpire( ).setCash( rs.getDouble( "cash" ) );
String allianceTag = rs.getString( "alliance_tag" );
if ( allianceTag != null ) {
AllianceInformation alliance = new AllianceInformation( );
alliance.setId( rs.getInt( "alliance_id" ) );
alliance.setTag( allianceTag );
alliance.setPending( rs.getBoolean( "alliance_pending" ) );
di.getEmpire( ).setAlliance( alliance );
}
return di;
}
};
this.mResearch = new RowMapper< ResearchInformation >( ) {
@Override
public ResearchInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
ResearchInformation ri = new ResearchInformation( );
ri.setId( rs.getInt( "line_id" ) );
ri.setCurrentLevel( rs.getInt( "level" ) );
ri.setLevelName( rs.getString( "name" ) );
ri.setAccumulated( rs.getDouble( "accumulated" ) );
return ri;
}
};
this.mPlanet = new RowMapper< PlanetInformation >( ) {
@Override
public PlanetInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
PlanetInformation pi = new PlanetInformation( );
pi.setId( rs.getInt( "planet_id" ) );
pi.setPopulation( rs.getDouble( "population" ) );
pi.setCurrentHappiness( rs.getDouble( "current_happiness" ) );
pi.setTargetHappiness( rs.getDouble( "target_happiness" ) );
pi.getCivilianQueue( ).setAccMoney( rs.getDouble( "civ_money" ) );
pi.getCivilianQueue( ).setAccWork( rs.getDouble( "civ_work" ) );
pi.getMilitaryQueue( ).setAccMoney( rs.getDouble( "mil_money" ) );
pi.getMilitaryQueue( ).setAccWork( rs.getDouble( "mil_work" ) );
return pi;
}
};
this.mQueueItem = new RowMapper< QueueItemInformation >( ) {
@Override
public QueueItemInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
QueueItemInformation qii = new QueueItemInformation( );
qii.setPlanetId( rs.getInt( "planet_id" ) );
qii.setMilitary( rs.getBoolean( "military" ) );
qii.setId( rs.getInt( "item_id" ) );
qii.setName( rs.getString( "item_name" ) );
qii.setDestroy( rs.getBoolean( "destroy" ) );
qii.setAmount( rs.getInt( "amount" ) );
return qii;
}
};
this.mBuildings = new RowMapper< BuildingsInformation >( ) {
@Override
public BuildingsInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
BuildingsInformation bi = new BuildingsInformation( );
bi.setPlanetId( rs.getInt( "planet_id" ) );
bi.setId( rs.getInt( "building_id" ) );
bi.setName( rs.getString( "building_name" ) );
bi.setAmount( rs.getInt( "amount" ) );
bi.setDamage( rs.getDouble( "damage" ) );
return bi;
}
};
this.mFleet = new RowMapper< FleetInformation >( ) {
@Override
public FleetInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
FleetInformation fi = new FleetInformation( );
fi.setId( rs.getLong( "fleet_id" ) );
fi.setName( rs.getString( "fleet_name" ) );
fi.setStatus( rs.getString( "status" ) );
fi.setAttacking( rs.getBoolean( "attacking" ) );
fi.setLocationId( rs.getInt( "location_id" ) );
fi.setLocationName( rs.getString( "location_name" ) );
Integer sourceId = (Integer) rs.getObject( "source_id" );
if ( sourceId != null ) {
MovementInformation mi = new MovementInformation( );
mi.setSourceId( sourceId );
mi.setSourceName( rs.getString( "source_name" ) );
mi.setTimeLeft( rs.getInt( "time_left" ) );
mi.setStateTimeLeft( rs.getInt( "state_time_left" ) );
mi.setNearId( (Integer) rs.getObject( "ref_point_id" ) );
mi.setNearName( rs.getString( "ref_point_name" ) );
mi.setOutwards( (Boolean) rs.getObject( "outwards" ) );
mi.setPastRefPoint( (Boolean) rs.getObject( "past_ref_point" ) );
mi.setStartX( (Float) rs.getObject( "start_x" ) );
mi.setStartY( (Float) rs.getObject( "start_y" ) );
fi.setMovement( mi );
}
return fi;
}
};
this.mShips = new RowMapper< ShipsInformation >( ) {
@Override
public ShipsInformation mapRow( ResultSet rs , int rowNum )
throws SQLException
{
ShipsInformation si = new ShipsInformation( );
si.setFleetId( rs.getLong( "fleet_id" ) );
si.setId( rs.getInt( "ship_id" ) );
si.setName( rs.getString( "ship_name" ) );
si.setAmount( rs.getInt( "amount" ) );
si.setDamage( rs.getDouble( "damage" ) );
return si;
}
};
}
@Autowired( required = true )
public void setDataSource( DataSource dataSource )
{
this.dTemplate = new SimpleJdbcTemplate( dataSource );
}
@Override
public String getSummary( int empireId )
{
String sql = "SELECT * FROM bugs.dump_main_view WHERE empire_id = ?";
DebugInformation di = this.dTemplate.queryForObject( sql , this.mMainInfo , empireId );
sql = "SELECT * FROM bugs.dump_research_view WHERE empire_id = ?";
for ( ResearchInformation ri : this.dTemplate.query( sql , this.mResearch , empireId ) ) {
di.getResearch( ).add( ri );
}
sql = "SELECT * FROM bugs.dump_planets_view WHERE empire_id = ?";
Map< Integer , PlanetInformation > planets = new HashMap< Integer , PlanetInformation >( );
for ( PlanetInformation pi : this.dTemplate.query( sql , this.mPlanet , empireId ) ) {
di.getPlanets( ).add( pi );
planets.put( pi.getId( ) , pi );
}
sql = "SELECT * FROM bugs.dump_queues_view WHERE empire_id = ? ORDER BY queue_order";
for ( QueueItemInformation qii : this.dTemplate.query( sql , this.mQueueItem , empireId ) ) {
PlanetInformation pi = planets.get( qii.getPlanetId( ) );
QueueInformation qi = ( qii.isMilitary( ) ? pi.getMilitaryQueue( ) : pi.getCivilianQueue( ) );
qi.getItems( ).add( qii );
}
sql = "SELECT * FROM bugs.dump_buildings_view WHERE empire_id = ?";
for ( BuildingsInformation bi : this.dTemplate.query( sql , this.mBuildings , empireId ) ) {
planets.get( bi.getPlanetId( ) ).getBuildings( ).add( bi );
}
sql = "SELECT * FROM bugs.dump_fleets_view WHERE empire_id = ?";
Map< Long , FleetInformation > fleets = new HashMap< Long , FleetInformation >( );
for ( FleetInformation fi : this.dTemplate.query( sql , this.mFleet , empireId ) ) {
di.getFleets( ).add( fi );
fleets.put( fi.getId( ) , fi );
}
sql = "SELECT * FROM bugs.dump_ships_view WHERE empire_id = ?";
for ( ShipsInformation si : this.dTemplate.query( sql , this.mShips , empireId ) ) {
fleets.get( si.getFleetId( ) ).getShips( ).add( si );
}
return this.xStream.toXML( di );
}
}

View file

@ -0,0 +1,114 @@
package com.deepclone.lw.beans.bt;
import java.util.Iterator;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import com.deepclone.lw.cmd.bt.data.*;
import com.deepclone.lw.cmd.player.bt.*;
import com.deepclone.lw.cmd.player.gdata.GamePageData;
import com.deepclone.lw.interfaces.bt.*;
import com.deepclone.lw.interfaces.game.EmpireManagement;
@Transactional
public class PlayerBugsBean
implements PlayerBugs
{
private EmpireManagement empireMgr;
private BugsDAO bugsDao;
private EmpireSummary summary;
@Autowired( required = true )
public void setBugsDao( BugsDAO bugsDao )
{
this.bugsDao = bugsDao;
}
@Autowired( required = true )
public void setEmpireMgr( EmpireManagement empireMgr )
{
this.empireMgr = empireMgr;
}
@Autowired( required = true )
public void setSummary( EmpireSummary summary )
{
this.summary = summary;
}
@Override
public ListBugsResponse getBugs( int empireId , BugStatus status , boolean ownOnly , long first , int count )
{
long nBugs = this.bugsDao.countReports( empireId , status , ownOnly );
List< BugReport > bugs = this.bugsDao.getReports( empireId , status , ownOnly , first , count );
GamePageData page = this.empireMgr.getGeneralInformation( empireId );
return new ListBugsResponse( page , status , ownOnly , first , count , nBugs , bugs );
}
@Override
public ReportBugResponse postReport( int empireId , String title , String desc )
{
long bugId = this.bugsDao.postReport( empireId , title , desc , this.summary.getSummary( empireId ) );
return new ReportBugResponse( this.empireMgr.getGeneralInformation( empireId ) , bugId );
}
@Override
public ViewBugResponse getReport( int empireId , long bugId )
{
GamePageData page = this.empireMgr.getGeneralInformation( empireId );
BugReport report = this.bugsDao.getReport( empireId , bugId );
if ( report == null ) {
return new ViewBugResponse( page );
}
List< BugEvent > events = this.bugsDao.getEvents( bugId );
Iterator< BugEvent > it = events.iterator( );
BugStatus status = BugStatus.PENDING;
boolean pub = false;
while ( it.hasNext( ) ) {
BugEvent event = it.next( );
BugEventType type = event.getType( );
if ( type == BugEventType.STATUS ) {
if ( event.getStatus( ) == status ) {
it.remove( );
} else {
status = event.getStatus( );
}
} else if ( type == BugEventType.VISIBILITY ) {
if ( event.getVisible( ) == pub ) {
it.remove( );
} else {
pub = event.getVisible( );
}
} else if ( type == BugEventType.COMMENT && !event.getVisible( ) ) {
BugSubmitter submitter = event.getSubmitter( );
if ( submitter.isAdmin( ) || submitter.getUserId( ) == null
|| !page.getEmpire( ).equals( submitter.getName( ) ) ) {
it.remove( );
}
}
}
return new ViewBugResponse( page , report , events );
}
@Override
public PostCommentResponse postComment( int empireId , long reportId , String comment )
{
this.bugsDao.postComment( empireId , reportId , comment );
return new PostCommentResponse( this.empireMgr.getGeneralInformation( empireId ) , true );
}
}

View file

@ -0,0 +1,98 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "account" )
public class AccountInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "address" )
private String address;
@XStreamAsAttribute
@XStreamAlias( "language" )
private String language;
@XStreamAsAttribute
@XStreamAlias( "game-credits" )
private int gameCredits;
@XStreamAsAttribute
@XStreamAlias( "status" )
private String status;
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getAddress( )
{
return address;
}
public void setAddress( String address )
{
this.address = address;
}
public String getLanguage( )
{
return language;
}
public void setLanguage( String language )
{
this.language = language;
}
public int getGameCredits( )
{
return gameCredits;
}
public void setGameCredits( int gameCredits )
{
this.gameCredits = gameCredits;
}
public String getStatus( )
{
return status;
}
public void setStatus( String status )
{
this.status = status;
}
}

View file

@ -0,0 +1,66 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "alliance" )
public class AllianceInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "tag" )
private String tag;
@XStreamAsAttribute
@XStreamAlias( "pending" )
private boolean pending;
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getTag( )
{
return tag;
}
public void setTag( String tag )
{
this.tag = tag;
}
public boolean isPending( )
{
return pending;
}
public void setPending( boolean pending )
{
this.pending = pending;
}
}

View file

@ -0,0 +1,96 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "building" )
public class BuildingsInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
private transient int planetId;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "name" )
private String name;
@XStreamAsAttribute
@XStreamAlias( "amount" )
private int amount;
@XStreamAsAttribute
@XStreamAlias( "damage" )
private double damage;
public int getPlanetId( )
{
return planetId;
}
public void setPlanetId( int planetId )
{
this.planetId = planetId;
}
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public int getAmount( )
{
return amount;
}
public void setAmount( int amount )
{
this.amount = amount;
}
public double getDamage( )
{
return damage;
}
public void setDamage( double damage )
{
this.damage = damage;
}
}

View file

@ -0,0 +1,81 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "debug" )
public class DebugInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "dump-version" )
private int version = 1;
private SystemInformation system = new SystemInformation( );
private AccountInformation account = new AccountInformation( );
private EmpireInformation empire = new EmpireInformation( );
@XStreamAlias( "research" )
private List< ResearchInformation > research = new LinkedList< ResearchInformation >( );
@XStreamAlias( "planets" )
private List< PlanetInformation > planets = new LinkedList< PlanetInformation >( );
@XStreamAlias( "fleets" )
private List< FleetInformation > fleets = new LinkedList< FleetInformation >( );
public int getVersion( )
{
return version;
}
public SystemInformation getSystem( )
{
return system;
}
public AccountInformation getAccount( )
{
return account;
}
public EmpireInformation getEmpire( )
{
return empire;
}
public List< ResearchInformation > getResearch( )
{
return research;
}
public List< PlanetInformation > getPlanets( )
{
return planets;
}
public List< FleetInformation > getFleets( )
{
return fleets;
}
}

View file

@ -0,0 +1,80 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "empire" )
public class EmpireInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "name" )
private String name;
@XStreamAsAttribute
@XStreamAlias( "cash" )
private double cash;
private AllianceInformation alliance;
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public double getCash( )
{
return cash;
}
public void setCash( double cash )
{
this.cash = cash;
}
public AllianceInformation getAlliance( )
{
return alliance;
}
public void setAlliance( AllianceInformation alliance )
{
this.alliance = alliance;
}
}

View file

@ -0,0 +1,133 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "fleet" )
public class FleetInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
private long id;
@XStreamAsAttribute
private String name;
@XStreamAsAttribute
private String status;
@XStreamAsAttribute
private boolean attacking;
@XStreamAlias( "location-id" )
private int locationId;
@XStreamAlias( "location-name" )
private String locationName;
@XStreamAlias( "ships" )
private List< ShipsInformation > ships = new LinkedList< ShipsInformation >( );
private MovementInformation movement;
public long getId( )
{
return id;
}
public void setId( long id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public String getStatus( )
{
return status;
}
public void setStatus( String status )
{
this.status = status;
}
public boolean isAttacking( )
{
return attacking;
}
public void setAttacking( boolean attacking )
{
this.attacking = attacking;
}
public int getLocationId( )
{
return locationId;
}
public void setLocationId( int locationId )
{
this.locationId = locationId;
}
public String getLocationName( )
{
return locationName;
}
public void setLocationName( String locationName )
{
this.locationName = locationName;
}
public MovementInformation getMovement( )
{
return movement;
}
public void setMovement( MovementInformation movement )
{
this.movement = movement;
}
public List< ShipsInformation > getShips( )
{
return ships;
}
}

View file

@ -0,0 +1,157 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias( "movement" )
public class MovementInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
private int sourceId;
private String sourceName;
private int timeLeft;
private int stateTimeLeft;
private Float startX;
private Float startY;
private Integer nearId;
private String nearName;
private Boolean outwards;
private Boolean pastRefPoint;
public int getSourceId( )
{
return sourceId;
}
public void setSourceId( int sourceId )
{
this.sourceId = sourceId;
}
public String getSourceName( )
{
return sourceName;
}
public void setSourceName( String sourceName )
{
this.sourceName = sourceName;
}
public int getTimeLeft( )
{
return timeLeft;
}
public void setTimeLeft( int timeLeft )
{
this.timeLeft = timeLeft;
}
public int getStateTimeLeft( )
{
return stateTimeLeft;
}
public void setStateTimeLeft( int stateTimeLeft )
{
this.stateTimeLeft = stateTimeLeft;
}
public Float getStartX( )
{
return startX;
}
public void setStartX( Float startX )
{
this.startX = startX;
}
public Float getStartY( )
{
return startY;
}
public void setStartY( Float startY )
{
this.startY = startY;
}
public Integer getNearId( )
{
return nearId;
}
public void setNearId( Integer nearId )
{
this.nearId = nearId;
}
public String getNearName( )
{
return nearName;
}
public void setNearName( String nearName )
{
this.nearName = nearName;
}
public Boolean getOutwards( )
{
return outwards;
}
public void setOutwards( Boolean outwards )
{
this.outwards = outwards;
}
public Boolean getPastRefPoint( )
{
return pastRefPoint;
}
public void setPastRefPoint( Boolean pastRefPoint )
{
this.pastRefPoint = pastRefPoint;
}
}

View file

@ -0,0 +1,124 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "planet" )
public class PlanetInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "id" )
private String name;
@XStreamAlias( "population" )
private double population;
@XStreamAlias( "current-happiness" )
private double currentHappiness;
@XStreamAlias( "target-happiness" )
private double targetHappiness;
@XStreamAlias( "buildings" )
private List< BuildingsInformation > buildings = new LinkedList< BuildingsInformation >( );
@XStreamAlias( "civ-queue" )
private QueueInformation civilianQueue = new QueueInformation( );
@XStreamAlias( "mil-queue" )
private QueueInformation militaryQueue = new QueueInformation( );
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public double getPopulation( )
{
return population;
}
public void setPopulation( double population )
{
this.population = population;
}
public double getCurrentHappiness( )
{
return currentHappiness;
}
public void setCurrentHappiness( double currentHappiness )
{
this.currentHappiness = currentHappiness;
}
public double getTargetHappiness( )
{
return targetHappiness;
}
public void setTargetHappiness( double targetHappiness )
{
this.targetHappiness = targetHappiness;
}
public List< BuildingsInformation > getBuildings( )
{
return buildings;
}
public QueueInformation getCivilianQueue( )
{
return civilianQueue;
}
public QueueInformation getMilitaryQueue( )
{
return militaryQueue;
}
}

View file

@ -0,0 +1,61 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.annotations.XStreamImplicit;
public class QueueInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "accumulated-work" )
private double accWork;
@XStreamAsAttribute
@XStreamAlias( "accumulated-money" )
private double accMoney;
@XStreamImplicit( itemFieldName = "item" )
private List< QueueItemInformation > items = new LinkedList< QueueItemInformation >( );
public double getAccWork( )
{
return accWork;
}
public void setAccWork( double accWork )
{
this.accWork = accWork;
}
public double getAccMoney( )
{
return accMoney;
}
public void setAccMoney( double accMoney )
{
this.accMoney = accMoney;
}
public List< QueueItemInformation > getItems( )
{
return items;
}
}

View file

@ -0,0 +1,108 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
public class QueueItemInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
transient private int planetId;
transient private boolean military;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "name" )
private String name;
@XStreamAsAttribute
@XStreamAlias( "destroy" )
private boolean destroy;
@XStreamAsAttribute
@XStreamAlias( "amount" )
private int amount;
public int getPlanetId( )
{
return planetId;
}
public void setPlanetId( int planetId )
{
this.planetId = planetId;
}
public boolean isMilitary( )
{
return military;
}
public void setMilitary( boolean military )
{
this.military = military;
}
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public boolean isDestroy( )
{
return destroy;
}
public void setDestroy( boolean destroy )
{
this.destroy = destroy;
}
public int getAmount( )
{
return amount;
}
public void setAmount( int amount )
{
this.amount = amount;
}
}

View file

@ -0,0 +1,83 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "research-line" )
public class ResearchInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "line")
private int id;
@XStreamAsAttribute
@XStreamAlias( "level")
private int currentLevel;
@XStreamAsAttribute
@XStreamAlias( "name")
private String levelName;
@XStreamAsAttribute
@XStreamAlias( "accumulated-points")
private double accumulated;
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public int getCurrentLevel( )
{
return currentLevel;
}
public void setCurrentLevel( int currentLevel )
{
this.currentLevel = currentLevel;
}
public String getLevelName( )
{
return levelName;
}
public void setLevelName( String levelName )
{
this.levelName = levelName;
}
public double getAccumulated( )
{
return accumulated;
}
public void setAccumulated( double accumulated )
{
this.accumulated = accumulated;
}
}

View file

@ -0,0 +1,96 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "ship-type" )
public class ShipsInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
transient private long fleetId;
@XStreamAsAttribute
@XStreamAlias( "id" )
private int id;
@XStreamAsAttribute
@XStreamAlias( "name" )
private String name;
@XStreamAsAttribute
@XStreamAlias( "amount" )
private long amount;
@XStreamAsAttribute
@XStreamAlias( "damage" )
private double damage;
public long getFleetId( )
{
return fleetId;
}
public void setFleetId( long fleetId )
{
this.fleetId = fleetId;
}
public int getId( )
{
return id;
}
public void setId( int id )
{
this.id = id;
}
public String getName( )
{
return name;
}
public void setName( String name )
{
this.name = name;
}
public long getAmount( )
{
return amount;
}
public void setAmount( long amount )
{
this.amount = amount;
}
public double getDamage( )
{
return damage;
}
public void setDamage( double damage )
{
this.damage = damage;
}
}

View file

@ -0,0 +1,50 @@
package com.deepclone.lw.beans.bt.esdata;
import java.io.Serializable;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
@XStreamAlias( "system-info" )
public class SystemInformation
implements Serializable
{
private static final long serialVersionUID = 1L;
@XStreamAsAttribute
@XStreamAlias( "computing-tick" )
private Long currentTick;
@XStreamAsAttribute
@XStreamAlias( "next-tick" )
private long nextTick;
public Long getCurrentTick( )
{
return currentTick;
}
public void setCurrentTick( Long currentTick )
{
this.currentTick = currentTick;
}
public long getNextTick( )
{
return nextTick;
}
public void setNextTick( long nextTick )
{
this.nextTick = nextTick;
}
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<import resource="bt/admin-bugs-bean.xml" />
<import resource="bt/bugs-dao-bean.xml" />
<import resource="bt/empire-summary-bean.xml" />
<import resource="bt/player-bugs-bean.xml" />
</beans>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="adminBugs" class="com.deepclone.lw.beans.bt.AdminBugsBean" />
</beans>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="bugsDAO" class="com.deepclone.lw.beans.bt.BugsDAOBean" />
</beans>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="empireSummary" class="com.deepclone.lw.beans.bt.EmpireSummaryBean" />
</beans>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="playerBugs" class="com.deepclone.lw.beans.bt.PlayerBugsBean" />
</beans>