Skip to content

Commit

Permalink
-gwt Install-linux scipt updates.
Browse files Browse the repository at this point in the history
-xi8ix GWTC 1.3.3.3 now supports -Dmaven.compiler.gwt.skip=true to skip GWT compile.
-Supervisor Search re-indexing
-Supervisor mailing list viewer
  • Loading branch information
jdwyah committed Feb 22, 2008
1 parent 3034a3b commit be34cd5
Show file tree
Hide file tree
Showing 14 changed files with 241 additions and 8 deletions.
5 changes: 5 additions & 0 deletions Setup/maven/gwt/gwt-google-apis-read-only/install-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-google-apis -Dversion=$1 -Dpackaging=jar -Dfile=build/lib/gwt-google-apis.jar -DgeneratePom=true
mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-google-apis -Dversion=$1 -Dpackaging=jar -Dfile=build/lib/gwt-google-apis.jar -DgeneratePom=true



11 changes: 11 additions & 0 deletions Setup/maven/gwt/gwt-trunk/install-linux
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-servlet -Dversion=$1 -Dpackaging=jar -Dfile=build/staging/gwt-linux-0.0.0/gwt-servlet.jar -DgeneratePom=true
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-user -Dversion=$1 -Dpackaging=jar -Dfile=build/staging/gwt-linux-0.0.0/gwt-user.jar -DgeneratePom=true
mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-user -Dversion=$1 -Dpackaging=jar -Dfile=build/staging/gwt-linux-0.0.0/gwt-user.jar -DgeneratePom=true
mvn install:install-file -DgroupId=com.google -DartifactId=gwt-dev-windows -Dversion=$1 -Dpackaging=jar -Dfile=build/staging/gwt-linux-0.0.0/gwt-dev-linux.jar -DgeneratePom=true
mvn install:install-file -Dclassifier=sources -DgroupId=com.google -DartifactId=gwt-dev-windows -Dversion=$1 -Dpackaging=jar -Dfile=build/staging/gwt-linux-0.0.0/gwt-dev-linux.jar -DgeneratePom=true
cp build/staging/gwt-linux-0.0.0/swt-win32-3235.dll "$USERPROFILE"/.m2/repository/com/google/gwt-dev-windows/$1
cp build/staging/gwt-linux-0.0.0/gwt-ll.dll "$USERPROFILE"/.m2/repository/com/google/gwt-dev-windows/$1




2 changes: 1 addition & 1 deletion Setup/maven/install-all
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
./install org.xi8ix xi8ix-gwtc 1.3.3.2 xi8ix-gwtc-1.3.3.2.jar
./install org.xi8ix xi8ix-gwtc 1.3.3.3 xi8ix-gwtc-1.3.3.3.jar
./install com.google gwt-incubator 0.0.1-20080117 gwt-incubator-0.0.1-20080117.jar
./install com.allen_sauer.gwt.dnd gwt-dnd 2.0.7 gwt-dnd-2.0.7.jar
./install com.allen_sauer.gwt.log gwt-log 1.5.1 gwt-log-1.5.1.jar
Expand Down
Binary file removed Setup/maven/xi8ix-gwtc-1.3.3.2.jar
Binary file not shown.
Binary file added Setup/maven/xi8ix-gwtc-1.3.3.3.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<plugin>
<groupId>org.xi8ix</groupId>
<artifactId>xi8ix-gwtc</artifactId>
<version>1.3.3.2</version>
<version>1.3.3.3</version>
<executions>
<execution>
<phase>compile</phase>
Expand Down
2 changes: 1 addition & 1 deletion run_jetty
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn -Dwebdir=/src/main/webapp jetty:run
mvn -Dwebdir=/src/main/webapp -Dmaven.compiler.gwt.skip=true jetty:run
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ List<String> searchForSchool(String searchString)

List<String> searchForSchool(String searchStringP, int start,
int max_num_hits) throws SiteException;

void reindex();
}
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ public void afterPropertiesSet() throws Exception {
}
this.compassTemplate = new CompassTemplate(compass);

// TODO find another way to call this, since it's a bit
// inefficient. Should be a administrator tool or something.
// to do it everytime tomcat restarts
// compassGPS.index();

// ensure that our gps is going to mirror all data changes from
// here on out.
// this will give us real time searchability of saved objects
Expand Down Expand Up @@ -291,4 +286,13 @@ public Object doInCompass(CompassSession session)
throw new SiteException(e);
}
}

/**
* re-index search. GPS will take care of most things, but if we edit
* the DB directly compass won't hear about it and we'll need to
* re-index.
*/
public void reindex() {
compassGPS.index();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
/*
* Copyright 2008 Jeff Dwyer
*
* Licensed under the Apache License, Version 2.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.apache.org/licenses/LICENSE-2.0
*
* 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 com.apress.progwt.server.web.controllers;

import javax.servlet.http.HttpServletRequest;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;

import com.apress.progwt.client.exception.InfrastructureException;
import com.apress.progwt.server.domain.MailingListEntry;
import com.apress.progwt.server.service.InvitationService;
import com.apress.progwt.server.service.SchoolService;
import com.apress.progwt.server.service.SearchService;
import com.apress.progwt.server.service.UserService;

/**
*
* @author Jeff Dwyer
*
*/
@Controller
public class SupervisorController {
private static final Logger log = Logger
.getLogger(SupervisorController.class);

private UserService userService;
private SchoolService schoolService;

private InvitationService invitationService;
private SearchService searchService;

@RequestMapping("/secure/extreme/mailinglist.html")
public ModelAndView mailingListHandler(HttpServletRequest req,
ModelMap map) {
ControllerUtil.updateModelMapWithDefaults(map, req, userService);

map.addAttribute("list", invitationService.getMailingList());
return new ModelAndView("secure/extreme/mailinglist", map);

}

@RequestMapping("/secure/extreme/mailinglistaction.html")
public ModelAndView resendInvite(HttpServletRequest request,
@RequestParam("entryID")
long entryID, ModelMap map) throws InfrastructureException {

MailingListEntry entry = invitationService.getEntryById(entryID);

invitationService.sendInvite(entry);

map.addAttribute("message", "Success Re-Sending Invite");

return mailingListHandler(request, map);
}

@RequestMapping("/secure/extreme/scripts.html")
public ModelAndView scriptsHandler(HttpServletRequest req,
ModelMap map) {
ControllerUtil.updateModelMapWithDefaults(map, req, userService);

return new ModelAndView("secure/extreme/scripts", map);
}

@RequestMapping("/secure/extreme/scripts_action_search_index.html")
public ModelAndView scriptsActionHandler(HttpServletRequest req,
ModelMap map) {

searchService.reindex();
map.addAttribute("message", "Re-Indexing begun");

return scriptsHandler(req, map);
}

@Autowired
public void setUserService(UserService userService) {
this.userService = userService;
}

@Autowired
public void setSchoolService(SchoolService schoolService) {
this.schoolService = schoolService;
}

@Autowired
public void setInvitationService(InvitationService invitationService) {
this.invitationService = invitationService;
}

@Autowired
public void setSearchService(SearchService searchService) {
this.searchService = searchService;
}

}
22 changes: 22 additions & 0 deletions src/main/webapp/WEB-INF/freemarker/mail/invitation.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<html>
<#if inviter?exists>
Congratulations, ${inviter.username} has sent you an invitation to ToCollege.net.
ToCollege.net is a website that let's you keep track of your College application process.
<#else>
Congratulations, your number has been called and you can now sign up to use ToCollege.net.
ToCollege.net is a website that let's you keep track of your College application process.
</#if>
<p>
Your secret key is ${randomkey}
<p>
You can use this key to signup for an account. Go to http://www.ToCollege.net/site/signup.html?secretkey=${randomkey} to signup or just
<a href="http://www.ToCollege.net.com/site/signup.html?secretkey=${randomkey}&email=${email?url}">click here.</a>
<p>
If you want to learn more about the site, just go to <a href="http://www.ToCollege.net/">ToCollege.net</a> and take a look at the screencasts.
<p>
Thanks for your time,
<p>
-Jeff Dwyer
Founder, ToCollege.net
http://www.ToCollege.net
</html>
45 changes: 45 additions & 0 deletions src/main/webapp/WEB-INF/freemarker/secure/extreme/mailinglist.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

<#import "/spring.ftl" as spring/>

<html>
<head>
<title>Mailing List</title>
</head>

<body>



<#if message?exists>
<p class="message">${message}</p>
</#if>
<div class="main">

<table>
<tr>
<th>email</th>
<th>key</th>
<th>inviter</th>
<th>signedup</th>
<th>mail ok</th>
<th></th>
</tr>

<#list list as entry>
<tr>
<td>${entry.email?default("")}</td>
<td>${entry.randomkey?default("")}</td>
<td><#if entry.inviter?exists>${entry.inviter.username}<#else>None</#if></td>
<td><#if entry.signedUpUser?exists>${entry.signedUpUser.username}<#else>None</#if></td>
<td>${entry.sentEmailOk?string}</td>
<td><a href="<@spring.url "/site/secure/extreme/mailinglistaction.html?entryID=${entry.id?c}"/>"/>Send Invite</a></td>
</tr>
</#list>
</table>



</div>

</body>
</html>
21 changes: 21 additions & 0 deletions src/main/webapp/WEB-INF/freemarker/secure/extreme/scripts.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

<#import "/spring.ftl" as spring/>

<html>
<head>
<title>Scripts</title>
</head>

<body>



<#if message?exists>
<p class="message">${message}</p>
</#if>
<div class="main">
<a href="<@spring.url "/site/secure/extreme/scripts_action_search_index.html"/>"/>Re-Index Search</a>
</div>

</body>
</html>
10 changes: 10 additions & 0 deletions src/main/webapp/WEB-INF/freemarker/secure/settings.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@

</@common.box>

<#if user?exists>
<#if user.supervisor>
<@common.box "boxStyle", "admin", "Admin">
<ul>
<li><a href="<@spring.url "/site/secure/extreme/mailinglist.html"/>"/>Mailing List</a></li>
<li><a href="<@spring.url "/site/secure/extreme/scripts.html"/>"/>Scripts</a></li>
</ul>
</@common.box>
</#if>
</#if>

</div><!--end browseWidgets-->

Expand Down

0 comments on commit be34cd5

Please sign in to comment.