forked from sakaiproject/sakai
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move polls from https://source.sakaiproject.org/contrib/uct/PollTool
git-svn-id: https://source.sakaiproject.org/svn/polls/trunk@23064 66ffb92e-73f9-0310-93c1-f5514f145a0a
- Loading branch information
Showing
62 changed files
with
6,088 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
This project initially constructed by Sakai App Builder Plugin | ||
Used the following settings: | ||
Project Name: poll | ||
Project Key: poll | ||
Project CamelCase Key: Poll | ||
Project lowerCamelCase Key: poll | ||
Project Type: RSF | ||
Project Impl: DIRS | ||
|
||
Sakai App Builder by Aaron Zeckoski ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
target | ||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
This project was generated by Sakai App Builder -AZ | ||
To use this project, you should copy this entire folder and all the files | ||
into your sakai source directory. If you do not know what that is you may | ||
want to check this website out: | ||
http://bugs.sakaiproject.org/confluence/display/BOOT | ||
|
||
Now that you have copied this over to your sakai source directory (or maybe it | ||
was already there), you should run the following command from within the root directory of your new project to download all the | ||
dependencies using maven and compile the code: | ||
maven bld | ||
|
||
Now you can import the project into eclipse (using the current location) | ||
or continue using it in eclipse if you created it in your sakai source tree. | ||
|
||
Frequently Asked Questions: | ||
Q: I have missing dependencies in the project I just created in Eclipse, what do I do? | ||
A: You need to run 'maven bld' in the project root directory first to download the | ||
dependencies using maven. Then do a clean and build in Eclipse and the errors will | ||
go away. | ||
|
||
Q: How do I create multiple eclipse projects like some Sakai tools do? | ||
A: This plugin does not support that practice. You are welcome to split things | ||
apart if you like though I do not recommend that. | ||
|
||
Comments or questions about the plugin should go to Aaron Zeckoski ([email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- This file generated by Sakai App Builder -AZ --> | ||
<project> | ||
<pomVersion>3</pomVersion> | ||
<extend>../../../master/project.xml</extend> | ||
<name>sakai-poll-logic-api</name> | ||
<groupId>sakaiproject</groupId> | ||
<id>sakai-poll-logic-api</id> | ||
<currentVersion>${sakai.version}</currentVersion> | ||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://www.sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2006</inceptionYear> | ||
|
||
<!-- you must deploy your business and DAO API to shared or it will be | ||
inaccessible to your tool --> | ||
<properties> | ||
<deploy.type>jar</deploy.type> | ||
<deploy.target>shared</deploy.target> | ||
</properties> | ||
|
||
<dependencies> | ||
|
||
<!-- Sakai plugin so we can run maven builds from this directory --> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai</artifactId> | ||
<version>${sakai.plugin.version}</version> | ||
<type>plugin</type> | ||
</dependency> | ||
|
||
<!-- our tool internal dependencies --> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-poll-model-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<!-- generic DAO --> | ||
<dependency> | ||
<groupId>generic-dao</groupId> | ||
<artifactId>generic-dao</artifactId> | ||
<version>0.8</version> | ||
<url>http://source.edtech.vt.edu/maven/</url> | ||
</dependency> | ||
|
||
<!-- sakai dependencies --> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-entity-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-util-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src/java</sourceDirectory> | ||
</build> | ||
|
||
</project> | ||
|
91 changes: 91 additions & 0 deletions
91
polls/api/logic/src/java/org/sakaiproject/poll/logic/PollListManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/********************************************************************************** | ||
* $URL: https://source.sakaiproject.org/contrib/uct/PollTool/trunk/api/logic/src/java/org/sakaiproject/poll/logic/PollListManager.java $ | ||
* $Id: PollListManager.java 3783 2007-03-05 06:04:22Z [email protected] $ | ||
*********************************************************************************** | ||
* | ||
* Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation. | ||
* | ||
* Licensed under the Educational Community License, Version 1.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.opensource.org/licenses/ecl1.php | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.poll.logic; | ||
|
||
import java.util.List; | ||
import org.sakaiproject.exception.PermissionException; | ||
import org.sakaiproject.entity.api.EntityProducer; | ||
import org.sakaiproject.poll.model.Option; | ||
import org.sakaiproject.poll.model.Poll; | ||
|
||
/** | ||
* This is the interface for the Manager for our poll tool, | ||
* it handles the data access functionality of the tool, we currently | ||
* have 2 implementations (memory and hibernate) | ||
* @author DH | ||
* | ||
*/ | ||
public interface PollListManager extends EntityProducer { | ||
|
||
// the permissions | ||
|
||
public static final String PERMISSION_VOTE = "poll.vote"; | ||
public static final String PERMISSION_ADD = "poll.add"; | ||
public static final String PERMISSION_DELETE_OWN = "poll.deleteOwn"; | ||
public static final String PERMISSION_DELETE_ANY = "poll.deleteAny"; | ||
public static final String PERMISSION_EDIT_ANY = "poll.editAny"; | ||
public static final String PERMISSION_EDIT_OWN = "poll.editOwn"; | ||
|
||
/** | ||
* Save a poll | ||
* @param t - the poll object to save | ||
* @return - true for success, false if failure | ||
*/ | ||
public boolean savePoll(Poll t); | ||
|
||
/** | ||
* Delete a poll | ||
* @param t - the poll object to remove | ||
* @return - true for success, false if failure | ||
*/ | ||
public boolean deletePoll(Poll t) throws PermissionException; | ||
|
||
public boolean saveOption(Option t); | ||
|
||
/** | ||
* Gets all the task objects for the site | ||
* @param siteId - the siteId of the site | ||
* @return - a collection of task objects (empty collection if none found) | ||
*/ | ||
public List findAllPolls(String siteId); | ||
|
||
/** | ||
* Retrieve a specific poll | ||
* @param pollId | ||
* @return a single poll object | ||
*/ | ||
public Poll getPollById(Long pollId); | ||
|
||
/** | ||
* Get a specific poll with all its votes | ||
* @param pollId | ||
* @return a poll object | ||
*/ | ||
public Poll getPollWithVotes(Long pollId); | ||
|
||
/** | ||
* Get a specific option by its id | ||
*/ | ||
public Option getOptionById(Long optionId); | ||
|
||
public void deleteOption(Option option); | ||
} |
51 changes: 51 additions & 0 deletions
51
polls/api/logic/src/java/org/sakaiproject/poll/logic/PollVoteManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/********************************************************************************** | ||
* $URL: https://source.sakaiproject.org/contrib/uct/PollTool/trunk/api/logic/src/java/org/sakaiproject/poll/logic/PollVoteManager.java $ | ||
* $Id: PollVoteManager.java 3783 2007-03-05 06:04:22Z [email protected] $ | ||
*********************************************************************************** | ||
* | ||
* Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation. | ||
* | ||
* Licensed under the Educational Community License, Version 1.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.opensource.org/licenses/ecl1.php | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
|
||
|
||
package org.sakaiproject.poll.logic; | ||
|
||
import java.util.List; | ||
|
||
import org.sakaiproject.poll.model.Poll; | ||
import org.sakaiproject.poll.model.Vote; | ||
|
||
public interface PollVoteManager { | ||
|
||
|
||
public boolean saveVote(Vote vote); | ||
|
||
public void deleteVote(Vote Vote); | ||
|
||
public List getAllVotesForPoll(Poll poll); | ||
|
||
|
||
public boolean userHasVoted(Long pollid, String userID); | ||
|
||
/** | ||
* Assumes current user | ||
* @param pollid | ||
* @return | ||
*/ | ||
public boolean userHasVoted(Long pollid); | ||
|
||
public int getDisctinctVotersForPoll(Poll poll); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- This file generated by Sakai App Builder -AZ --> | ||
<project> | ||
<pomVersion>3</pomVersion> | ||
<extend>../../../master/project.xml</extend> | ||
<name>sakai-poll-model-api</name> | ||
<groupId>sakaiproject</groupId> | ||
<id>sakai-poll-model-api</id> | ||
<currentVersion>${sakai.version}</currentVersion> | ||
<organization> | ||
<name>Sakai Project</name> | ||
<url>http://www.sakaiproject.org/</url> | ||
</organization> | ||
<inceptionYear>2006</inceptionYear> | ||
|
||
<!-- you must deploy your model to shared or it will be inaccessible by Hibernate --> | ||
<properties> | ||
<deploy.type>jar</deploy.type> | ||
<deploy.target>shared</deploy.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<!-- the model should have no dependencies --> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-entity-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-authz-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-entity-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-site-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-tool-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-user-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-util-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-component-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>sakaiproject</groupId> | ||
<artifactId>sakai-event-api</artifactId> | ||
<version>${sakai.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-lang</groupId> | ||
<artifactId>commons-lang</artifactId> | ||
<version>2.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<sourceDirectory>src/java</sourceDirectory> | ||
</build> | ||
|
||
</project> | ||
|
40 changes: 40 additions & 0 deletions
40
polls/api/model/src/java/org/sakaiproject/poll/model/Option.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/********************************************************************************** | ||
* $URL: https://source.sakaiproject.org/contrib/uct/PollTool/trunk/api/model/src/java/org/sakaiproject/poll/model/Option.java $ | ||
* $Id: Option.java 3733 2007-03-01 14:55:42Z [email protected] $ | ||
*********************************************************************************** | ||
* | ||
* Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation. | ||
* | ||
* Licensed under the Educational Community License, Version 1.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.opensource.org/licenses/ecl1.php | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
|
||
package org.sakaiproject.poll.model; | ||
|
||
public interface Option { | ||
|
||
|
||
public void setId(Long getId); | ||
|
||
public Long getId(); | ||
|
||
public void setOptionText(String option); | ||
|
||
public String getOptionText(); | ||
|
||
public Long getPollId(); | ||
public void setPollId(Long pollId); | ||
|
||
public void setStatus(String status); | ||
public String getStatus(); | ||
} |
Oops, something went wrong.