|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||

java.lang.Objectorg.directdemocracyportal.democracy.service.PortalServiceImpl
@Transactional(propagation=REQUIRED) public class PortalServiceImpl extends java.lang.Object implements PortalService
The Class PortalServiceImpl.
| Constructor and Description |
|---|
PortalServiceImpl(UserDAO userDAO,
EventDAO eventDAO,
PortalDAO portalDAO,
CountryDAO countryDAO,
UserSessionDAO userSessionDAO,
PoliticalPartyDAO politicalPartyDAO,
GovernmentDAO governmentDAO,
AgentDAO agentDAO,
DocumentDAO documentDAO,
RoleDAO roleDAO,
RegionDAO regionDAO)
Instantiates a new portal service impl. |
| Modifier and Type | Method and Description |
|---|---|
void |
addMember(Organisation organisation,
Person person)
Adds the member. |
void |
addMemberById(java.lang.Long orgId,
java.lang.Long personId)
Adds the member by id. |
void |
addResolutionIssue(Resolution resolution,
Issue issue,
VoteResult voteResult)
Adds the resolution issue. |
void |
addRolePlayed(Role role,
Person person)
Adds the role played. |
void |
addRolePlayedById(java.lang.Long roleId,
java.lang.Long agentId)
Adds the role played by id. |
Country |
createCountry(java.lang.String name)
Creates the country. |
void |
createElection(java.lang.String name,
ElectionType electionType,
java.lang.Long governmentid)
Creates the election. |
Government |
createGovernment(java.lang.String name,
java.lang.Long countryId,
GovernmentType governmentType,
java.lang.String headOfstate)
Creates the government. |
Organisation |
createOrganisation(java.lang.String name,
java.lang.String abbr,
Country country,
Region region,
OrganisationType organisationType,
Organisation parent)
Creates the organisation. |
void |
createOrganisationById(java.lang.String name,
java.lang.String abbr,
java.lang.Long countryId,
java.lang.Long regionId,
OrganisationType organisationType,
java.lang.Long orgId)
Creates the organisation by id. |
Organisation |
createOrgUnit(java.lang.String orgName,
java.lang.String shortName,
OrganisationType organisationType,
java.lang.Long orgId)
Creates the org unit. |
PoliticalParty |
createParty(CreatePartyCommand command,
java.lang.Long userId)
Creates the party. |
Person |
createPerson(java.lang.String name)
Creates the person. |
PoliticalParty |
createPoliticalParty(java.lang.String name,
java.lang.String shortCode,
Country country,
Region region)
Creates the political party. |
PoliticalParty |
createPoliticalPartyById(java.lang.String name,
java.lang.String shortCode,
java.lang.Long countryId)
Creates the political party by id. |
Government |
createRegionalGovernment(java.lang.String name,
Country country,
Region region,
OrganisationType organisationType,
Government parentGovernment)
Creates the regional government. |
void |
createResolution(Resolution resolution)
Creates the resolution. |
Role |
createRoleInOrg(java.lang.String roleName,
Organisation organisation)
Creates the role in org. |
Country |
findCountryByName(java.lang.String name)
Find country by name. |
Person |
findMemberByNameInOrg(java.lang.Long orgId,
java.lang.String name)
Find member by name in org. |
Organisation |
findOrgByName(java.lang.String name)
Find org by name. |
PoliticalParty |
findPartyByShortCode(java.lang.String shortCode)
Find party by short code. |
Region |
findRegionByName(java.lang.String name)
Find region by name. |
java.util.List<UserSession> |
getActiveUserSessions()
Gets the active user sessions. |
java.util.List<Country> |
getCountries()
Gets the countries. |
java.util.List<Resolution> |
getDecidedResolutions()
Gets the decided resolutions. |
java.util.List<Election> |
getElections()
Gets the elections. |
java.util.List<Event> |
getEvents()
Gets the events. |
Portal |
getGlobalPortal()
Gets the global portal. |
Government |
getGovernment(java.lang.Long governmentId)
Gets the government. |
java.util.List<Government> |
getGovernments()
Gets the governments. |
java.util.List<OnlinePoliticalParty> |
getOnlinePoliticalParties()
Gets the online political parties. |
GroupAgent |
getOrganisation(java.lang.Long organisationId)
Gets the organisation. |
java.util.List<PoliticalParty> |
getPoliticalParties()
Gets the political parties. |
PoliticalParty |
getPoliticalParty(java.lang.Long partyId)
Gets the political party. |
java.util.List<Portal> |
getPortals()
Gets the portals. |
java.util.List<User> |
getUsers()
Gets the users. |
OnlinePoliticalParty |
joinParty(java.lang.Long partyId,
java.lang.Long userId)
Join party. |
void |
setResolutionDecidedDate(Resolution resolution,
java.util.Date parseDate)
Sets the resolution decided date. |
void |
updateVoteResult(VoteResult voteResult)
Update vote result. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortalServiceImpl(UserDAO userDAO,
EventDAO eventDAO,
PortalDAO portalDAO,
CountryDAO countryDAO,
UserSessionDAO userSessionDAO,
PoliticalPartyDAO politicalPartyDAO,
GovernmentDAO governmentDAO,
AgentDAO agentDAO,
DocumentDAO documentDAO,
RoleDAO roleDAO,
RegionDAO regionDAO)
userDAO - the user daoeventDAO - the event daoportalDAO - the portal daocountryDAO - the country daouserSessionDAO - the user session daopoliticalPartyDAO - the political party daogovernmentDAO - the government daoagentDAO - the agent daodocumentDAO - the document daoroleDAO - the role daoregionDAO - the region dao| Method Detail |
|---|
public java.util.List<Event> getEvents()
PortalService
getEvents in interface PortalServicepublic java.util.List<Election> getElections()
PortalService
getElections in interface PortalServicepublic java.util.List<Government> getGovernments()
PortalService
getGovernments in interface PortalServicepublic java.util.List<Portal> getPortals()
PortalService
getPortals in interface PortalServicepublic java.util.List<Country> getCountries()
PortalService
getCountries in interface PortalService
public PoliticalParty createParty(CreatePartyCommand command,
java.lang.Long userId)
throws PartyAlreadyExistException
PortalService
createParty in interface PortalServicecommand - the commanduserId - the user idPartyAlreadyExistException - the party already exist exceptionpublic java.util.List<PoliticalParty> getPoliticalParties()
PortalService
getPoliticalParties in interface PortalServicepublic PoliticalParty getPoliticalParty(java.lang.Long partyId)
PortalService
getPoliticalParty in interface PortalServicepartyId - the party id
public OnlinePoliticalParty joinParty(java.lang.Long partyId,
java.lang.Long userId)
PortalService
joinParty in interface PortalServicepartyId - the party iduserId - the user idpublic Government getGovernment(java.lang.Long governmentId)
PortalService
getGovernment in interface PortalServicegovernmentId - the government idpublic java.util.List<UserSession> getActiveUserSessions()
PortalService
getActiveUserSessions in interface PortalServicepublic java.util.List<User> getUsers()
PortalService
getUsers in interface PortalServicepublic GroupAgent getOrganisation(java.lang.Long organisationId)
PortalService
getOrganisation in interface PortalServiceorganisationId - the organisation idpublic java.util.List<OnlinePoliticalParty> getOnlinePoliticalParties()
PortalService
getOnlinePoliticalParties in interface PortalService
public PoliticalParty createPoliticalParty(java.lang.String name,
java.lang.String shortCode,
Country country,
Region region)
PortalService
createPoliticalParty in interface PortalServicename - the nameshortCode - the short codecountry - the countryregion - the region
public void addMember(Organisation organisation,
Person person)
PortalService
addMember in interface PortalServiceorganisation - the organisationperson - the person
public void addRolePlayed(Role role,
Person person)
PortalService
addRolePlayed in interface PortalServicerole - the roleperson - the person
public Role createRoleInOrg(java.lang.String roleName,
Organisation organisation)
PortalService
createRoleInOrg in interface PortalServiceroleName - the role nameorganisation - the organisation
public Organisation createOrganisation(java.lang.String name,
java.lang.String abbr,
Country country,
Region region,
OrganisationType organisationType,
Organisation parent)
throws OrganisationAlreadyExistException
PortalService
createOrganisation in interface PortalServicename - the nameabbr - the abbrcountry - the countryregion - the regionorganisationType - the organisation typeparent - the parentOrganisationAlreadyExistException - the organisation already exist exception
public Government createGovernment(java.lang.String name,
java.lang.Long countryId,
GovernmentType governmentType,
java.lang.String headOfstate)
PortalService
createGovernment in interface PortalServicename - the namecountryId - the country idgovernmentType - the government typeheadOfstate - the head of statepublic Portal getGlobalPortal()
PortalService
getGlobalPortal in interface PortalService
public Government createRegionalGovernment(java.lang.String name,
Country country,
Region region,
OrganisationType organisationType,
Government parentGovernment)
PortalService
createRegionalGovernment in interface PortalServicename - the namecountry - the countryregion - the regionorganisationType - the organisation typeparentGovernment - the parent governmentpublic void createResolution(Resolution resolution)
PortalService
createResolution in interface PortalServiceresolution - the resolution
public void setResolutionDecidedDate(Resolution resolution,
java.util.Date parseDate)
PortalService
setResolutionDecidedDate in interface PortalServiceresolution - the resolutionparseDate - the parse datepublic java.util.List<Resolution> getDecidedResolutions()
PortalService
getDecidedResolutions in interface PortalService
public void addResolutionIssue(Resolution resolution,
Issue issue,
VoteResult voteResult)
PortalService
addResolutionIssue in interface PortalServiceresolution - the resolutionissue - the issuevoteResult - the vote resultpublic void updateVoteResult(VoteResult voteResult)
PortalService
updateVoteResult in interface PortalServicevoteResult - the vote result
public Organisation createOrgUnit(java.lang.String orgName,
java.lang.String shortName,
OrganisationType organisationType,
java.lang.Long orgId)
throws OrganisationAlreadyExistException
PortalService
createOrgUnit in interface PortalServiceorgName - the org nameshortName - the short nameorganisationType - the internalorgId - the org idOrganisationAlreadyExistException - the organisation already exist exceptionpublic Organisation findOrgByName(java.lang.String name)
PortalService
findOrgByName in interface PortalServicename - the sveriges riksdag
public Person findMemberByNameInOrg(java.lang.Long orgId,
java.lang.String name)
PortalService
findMemberByNameInOrg in interface PortalServiceorgId - the org idname - the president name
public void addMemberById(java.lang.Long orgId,
java.lang.Long personId)
PortalService
addMemberById in interface PortalServiceorgId - the org idpersonId - the person id
public void addRolePlayedById(java.lang.Long roleId,
java.lang.Long agentId)
PortalService
addRolePlayedById in interface PortalServiceroleId - the role idagentId - the agent idpublic Country createCountry(java.lang.String name)
PortalService
createCountry in interface PortalServicename - the sverigepublic Country findCountryByName(java.lang.String name)
PortalService
findCountryByName in interface PortalServicename - the country
public void createElection(java.lang.String name,
ElectionType electionType,
java.lang.Long governmentid)
PortalService
createElection in interface PortalServicename - the nameelectionType - the election typegovernmentid - the id
public PoliticalParty createPoliticalPartyById(java.lang.String name,
java.lang.String shortCode,
java.lang.Long countryId)
PortalService
createPoliticalPartyById in interface PortalServicename - the nameshortCode - the short codecountryId - the country id
public void createOrganisationById(java.lang.String name,
java.lang.String abbr,
java.lang.Long countryId,
java.lang.Long regionId,
OrganisationType organisationType,
java.lang.Long orgId)
throws org.springframework.dao.DataAccessException,
OrganisationAlreadyExistException
PortalService
createOrganisationById in interface PortalServicename - the nameabbr - the abbrcountryId - the country idregionId - the region idorganisationType - the typeorgId - the org idorg.springframework.dao.DataAccessException - the data access exceptionOrganisationAlreadyExistException - the organisation already exist exceptionpublic PoliticalParty findPartyByShortCode(java.lang.String shortCode)
PortalService
findPartyByShortCode in interface PortalServiceshortCode - the trimpublic Person createPerson(java.lang.String name)
PortalService
createPerson in interface PortalServicename - the namepublic Region findRegionByName(java.lang.String name)
PortalService
findRegionByName in interface PortalServicename - the name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||