org.directdemocracyportal.democracy.service
Interface PortalService

Package class diagram package PortalService
All Known Implementing Classes:
PortalServiceImpl

public interface PortalService

The Interface PortalService.


Method Summary
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 sverige)
          Creates the country.
 void createElection(java.lang.String name, ElectionType electionType, java.lang.Long id)
          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 type, java.lang.Long orgId)
          Creates the organisation by id.
 Organisation createOrgUnit(java.lang.String orgName, java.lang.String shortName, OrganisationType internal, 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 country)
          Find country by name.
 Person findMemberByNameInOrg(java.lang.Long orgId, java.lang.String presidentName)
          Find member by name in org.
 Organisation findOrgByName(java.lang.String sverigesRiksdag)
          Find org by name.
 PoliticalParty findPartyByShortCode(java.lang.String trim)
          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.
 

Method Detail

getActiveUserSessions

java.util.List<UserSession> getActiveUserSessions()
Gets the active user sessions.

Returns:
the active user sessions

getUsers

java.util.List<User> getUsers()
Gets the users.

Returns:
the users

getEvents

java.util.List<Event> getEvents()
Gets the events.

Returns:
the events

getElections

java.util.List<Election> getElections()
Gets the elections.

Returns:
the elections

getGovernments

java.util.List<Government> getGovernments()
Gets the governments.

Returns:
the governments

getPortals

java.util.List<Portal> getPortals()
Gets the portals.

Returns:
the portals

getCountries

java.util.List<Country> getCountries()
Gets the countries.

Returns:
the countries

createParty

PoliticalParty createParty(CreatePartyCommand command,
                           java.lang.Long userId)
                           throws PartyAlreadyExistException
Creates the party.

Parameters:
command - the command
userId - the user id
Returns:
the political party
Throws:
PartyAlreadyExistException - the party already exist exception

getPoliticalParties

java.util.List<PoliticalParty> getPoliticalParties()
Gets the political parties.

Returns:
the political parties

getOnlinePoliticalParties

java.util.List<OnlinePoliticalParty> getOnlinePoliticalParties()
Gets the online political parties.

Returns:
the online political parties

getPoliticalParty

PoliticalParty getPoliticalParty(java.lang.Long partyId)
Gets the political party.

Parameters:
partyId - the party id
Returns:
the political party

joinParty

OnlinePoliticalParty joinParty(java.lang.Long partyId,
                               java.lang.Long userId)
Join party.

Parameters:
partyId - the party id
userId - the user id
Returns:
the online political party

getGovernment

Government getGovernment(java.lang.Long governmentId)
Gets the government.

Parameters:
governmentId - the government id
Returns:
the government

getOrganisation

GroupAgent getOrganisation(java.lang.Long organisationId)
Gets the organisation.

Parameters:
organisationId - the organisation id
Returns:
the organisation

createGovernment

Government createGovernment(java.lang.String name,
                            java.lang.Long countryId,
                            GovernmentType governmentType,
                            java.lang.String headOfState)
Creates the government.

Parameters:
name - the name
countryId - the country id
governmentType - the government type
headOfState - the head of state
Returns:
the government

createRegionalGovernment

Government createRegionalGovernment(java.lang.String name,
                                    Country country,
                                    Region region,
                                    OrganisationType organisationType,
                                    Government parentGovernment)
Creates the regional government.

Parameters:
name - the name
country - the country
region - the region
organisationType - the organisation type
parentGovernment - the parent government
Returns:
the government

createPoliticalParty

PoliticalParty createPoliticalParty(java.lang.String name,
                                    java.lang.String shortCode,
                                    Country country,
                                    Region region)
Creates the political party.

Parameters:
name - the name
shortCode - the short code
country - the country
region - the region
Returns:
the political party

createOrganisation

Organisation createOrganisation(java.lang.String name,
                                java.lang.String abbr,
                                Country country,
                                Region region,
                                OrganisationType organisationType,
                                Organisation parent)
                                throws OrganisationAlreadyExistException
Creates the organisation.

Parameters:
name - the name
abbr - the abbr
country - the country
region - the region
organisationType - the organisation type
parent - the parent
Returns:
the organisation
Throws:
OrganisationAlreadyExistException - the organisation already exist exception

addMember

void addMember(Organisation organisation,
               Person person)
Adds the member.

Parameters:
organisation - the organisation
person - the person

addRolePlayed

void addRolePlayed(Role role,
                   Person person)
Adds the role played.

Parameters:
role - the role
person - the person

createRoleInOrg

Role createRoleInOrg(java.lang.String roleName,
                     Organisation organisation)
Creates the role in org.

Parameters:
roleName - the role name
organisation - the organisation
Returns:
the role

getGlobalPortal

Portal getGlobalPortal()
Gets the global portal.

Returns:
the global portal

createResolution

void createResolution(Resolution resolution)
Creates the resolution.

Parameters:
resolution - the resolution

setResolutionDecidedDate

void setResolutionDecidedDate(Resolution resolution,
                              java.util.Date parseDate)
Sets the resolution decided date.

Parameters:
resolution - the resolution
parseDate - the parse date

getDecidedResolutions

java.util.List<Resolution> getDecidedResolutions()
Gets the decided resolutions.

Returns:
the decided resolutions

addResolutionIssue

void addResolutionIssue(Resolution resolution,
                        Issue issue,
                        VoteResult voteResult)
Adds the resolution issue.

Parameters:
resolution - the resolution
issue - the issue
voteResult - the vote result

updateVoteResult

void updateVoteResult(VoteResult voteResult)
Update vote result.

Parameters:
voteResult - the vote result

findOrgByName

Organisation findOrgByName(java.lang.String sverigesRiksdag)
Find org by name.

Parameters:
sverigesRiksdag - the sveriges riksdag
Returns:
the organisation

createOrgUnit

Organisation createOrgUnit(java.lang.String orgName,
                           java.lang.String shortName,
                           OrganisationType internal,
                           java.lang.Long orgId)
                           throws OrganisationAlreadyExistException
Creates the org unit.

Parameters:
orgName - the org name
shortName - the short name
internal - the internal
orgId - the org id
Returns:
the organisation
Throws:
OrganisationAlreadyExistException - the organisation already exist exception

findMemberByNameInOrg

Person findMemberByNameInOrg(java.lang.Long orgId,
                             java.lang.String presidentName)
Find member by name in org.

Parameters:
orgId - the org id
presidentName - the president name
Returns:
the person

addMemberById

void addMemberById(java.lang.Long orgId,
                   java.lang.Long personId)
Adds the member by id.

Parameters:
orgId - the org id
personId - the person id

addRolePlayedById

void addRolePlayedById(java.lang.Long roleId,
                       java.lang.Long agentId)
Adds the role played by id.

Parameters:
roleId - the role id
agentId - the agent id

findCountryByName

Country findCountryByName(java.lang.String country)
Find country by name.

Parameters:
country - the country
Returns:
the country

createCountry

Country createCountry(java.lang.String sverige)
Creates the country.

Parameters:
sverige - the sverige
Returns:
the country

createElection

void createElection(java.lang.String name,
                    ElectionType electionType,
                    java.lang.Long id)
Creates the election.

Parameters:
name - the name
electionType - the election type
id - the id

createPoliticalPartyById

PoliticalParty createPoliticalPartyById(java.lang.String name,
                                        java.lang.String shortCode,
                                        java.lang.Long countryId)
Creates the political party by id.

Parameters:
name - the name
shortCode - the short code
countryId - the country id
Returns:
the political party

createOrganisationById

void createOrganisationById(java.lang.String name,
                            java.lang.String abbr,
                            java.lang.Long countryId,
                            java.lang.Long regionId,
                            OrganisationType type,
                            java.lang.Long orgId)
                            throws org.springframework.dao.DataAccessException,
                                   OrganisationAlreadyExistException
Creates the organisation by id.

Parameters:
name - the name
abbr - the abbr
countryId - the country id
regionId - the region id
type - the type
orgId - the org id
Throws:
org.springframework.dao.DataAccessException - the data access exception
OrganisationAlreadyExistException - the organisation already exist exception

findPartyByShortCode

PoliticalParty findPartyByShortCode(java.lang.String trim)
Find party by short code.

Parameters:
trim - the trim
Returns:
the political party

createPerson

Person createPerson(java.lang.String name)
Creates the person.

Parameters:
name - the name
Returns:
the person

findRegionByName

Region findRegionByName(java.lang.String name)
Find region by name.

Parameters:
name - the name
Returns:
the region


Copyright © 2004-2010 www.DirectDemocracyPortal.org. All Rights Reserved.