Skip to content

Commit

Permalink
Merge com segundo pull request da pós.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloborba committed Jul 23, 2013
2 parents 076de46 + cae73b2 commit 64505cc
Show file tree
Hide file tree
Showing 75 changed files with 1,116 additions and 151 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

.classpath

.project
Expand Down
4 changes: 3 additions & 1 deletion ProductGeneration/ck.xml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@
</transformation>
</configuration>

<configuration xmlns="">

<configuration xmlns="">
<expression>rgms</expression>
<transformation>
Expand Down Expand Up @@ -1243,4 +1245,4 @@
</transformation>
</configuration>
-->
</configurationModel>
</configurationModel>
71 changes: 42 additions & 29 deletions ProductGeneration/compModelTeste.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,9 @@ publication => grailsapp/domain/rgms/publication/Publication.groovy;
history => grailsapp/domain/rgms/member/Record.groovy;
researchGroup => grailsapp/domain/rgms/member/ResearchGroup.groovy;
Role => grailsapp/domain/rgms/authentication/Role.groovy;
thesis => grailsapp/domain/rgms/publication/Tese.groovy;
researchLine => grailsapp/domain/rgms/publication/ResearchLine.groovy;
visitor => grailsapp/domain/rgms/visit/Visitor.groovy;
visit => grailsapp/domain/rgms/visit/Visit.groovy;
thesis => gr=> grailsapp/domain/rgms/publication/ResearchLine.groovy;
researchLine => grailsapp/domain/rgms/ResearchLine.groovy;
defaultValueManager => grailsapp/domain/rgms/DefaultValueManager.groovy;

initial => grailsapp/views/initial.gsp;

Expand All @@ -132,8 +131,6 @@ reportFR => grailsapp/conf/reportfr.properties;
reportBR => grailsapp/conf/reportptBR.properties;
reportUS => grailsapp/conf/reportus.properties;

ShiroRoleController => grailsapp/controllers/ShiroRoleController.groovy;
ShiroUserController => grailsapp/controllers/ShiroUserController.groovy;


AuthController => grailsapp/controllers/rgms/authentication/AuthController.groovy;
Expand All @@ -145,11 +142,11 @@ MembershipController => grailsapp/controllers/rgms/member/MembershipController.g
PeriodicoController => grailsapp/controllers/rgms/publication/PeriodicoController.groovy;
PublicationController => grailsapp/controllers/rgms/publication/PublicationController.groovy;
RecordController => grailsapp/controllers/rgms/member/RecordController.groovy;
ResearchGroupController => grailsapp/controllers/rgms/member/ResearchGroupController.groovy;
RoleController => grailsapp/controllers/rgms/authentication/RoleController.groovy;
TeseController => grailsapp/controllers/rgms/publication/TeseController.groovy;
VisitorController => grailsapp/controllers/rgms/visit/VisitorController.groovy;
VisitController => grailsapp/controllers/rgms/visit/VisitController.groovy;
ResearchGroupController => grailecordController => grailsapp/controllers/rgms/RecordController.groovy;
ResearchGroupController => grailsapp/controllers/rgms/ResearchGrogroovy;
TeseController => grailsapp/controllers/rgms/TeseController.groovy;
ResearchGroupController => grailsapp/controllers/rgms/ResearchGrogroovy;
TeseController => grailsapp/controllers/rgms/TeseController.groovy;



Expand All @@ -173,25 +170,41 @@ shiro => grailsapp/i18n/shiro.properties;
TwitterTool => grailsapp/controllers/rgms/tool/TwitterTool.groovy;
TwitterController => grailsapp/controllers/rgms/tool/TwitterController.groovy;
FacebookTool => grailsapp/controllers/rgms/tool/FacebookTool.groovy;
FacebookController => grailsapp/controllers/rgms/tool/FacebookController.groovy;


ShiroDbRealm => grailsapp/realms/ShiroDbRealm.groovy;


ShiroDbRealmRGMS => grailsapp/realms/rgms/ShiroDbRealm.groovy;


JqueryUiTagLib => grailsapp/taglib/com/grailsrocks/jqueryui/JqueryUiTagLib.groovy;


ferramentas => webapp/reports/reportBundle/ferramentas.jrxml;
memberPubs => webapp/reports/reportBundle/memberPubs.jrxml;
memberTools => webapp/reports/reportBundle/memberTools.jrxml;
publications => webapp/reports/reportBundle/publications.jrxml;
report => webapp/reports/reportBundle/report.jrxml;
FacebookController => grailsapp/controllers/rgms/tooferramentas => webapp/reports/reportBundle/ferramentas.jrxml;entas.jrxml;
memberPubs => webapp/reports/report_Bundle/memberPubs.jrxml;
memberTools => webapp/reports/report_Bundle/memberTools.jrxml;
publications => webapp/reports/report_Bundle/publications.jrxml;
report => webapp/reports/report_Bundle/report.jrxml;
report1 => webapp/reports/report_Bundle/report1.jrxml;
researchGroupReport => webapp/reports/repor> webapp/reports/reportBundle/report.jrxml;
report1 => webapp/reports/reportBundle/report1.jrxml;
researchGroup => webapp/reports/reportBundle/researchGroup.jrxml;
report1 => webapp/reports/reportBundle/report1.jrxml;
researchGroup => webapp/reports/reportBundle/researchGroup.jrxml;

ferramentaFeature => test/cucumber/Ferramenta.feature;
bookchapterFeature => test/cucumber/BookChapter.feature;
dissertacaoFeature => test/cucumber/Dissertacao.feature;
conferenciaFeature => test/cucumber/Conferencia.feature;
technicalreportFeature => test/cucumber/TechnicalReport.feature;

testFunctionalFormPage => test/functional/pages/FormPage.groovy;
testFunctionalTechnicalReportCreatePage => test/functional/pages/TechnicalReportCreatePage.groovy;
testFunctionalFerramentaCreate => test/functional/pages/FerramentaCreate.groovy;
testFunctionalDissertationCreate => test/functional/pages/DissertationCreate.groovy;
testFunctionalBookChapterCreatePage => test/functional/pages/BookChapterCreatePage.groovy;
testFunctionalConferenciaCreatePage => test/functional/pages/ConferenciaCreatePage.groovy;

bibtexParse => grailsapp/domain/rgms/publication/BibtexParse.groovy;
bibtexFile => grailsapp/domain/rgms/publication/BibtexFile.groovy;
bibtexFileController => grailsapp/controllers/rgms/publication/BibtexFileController.groovy;
sampleBibtex => test/cucumber/steps/sample.bibtex;
homeBibtexFile => grailsapp/views/bibtexFile/home.gsp;
bibtexImportFeature => test/cucumber/BibtexImport.feature;
bibtexImportSteps => test/cucumber/steps/BibtexImportSteps.groovy;
strategyParse => grailsapp/domain/rgms/publication/strategyBibtexParse/StrategyParse.java;
strategyParseDissertacao => grailsapp/domain/rgms/publication/strategyBibtexParse/StrategyParseDissertacao.java;
strategyParseTese => grailsapp/domain/rgms/publication/strategyBibtexParse/StrategyParseTese.java;

ArticleFeature => test/cucumber/Article.feature;
env => test/cucumber/hooks/env.groovy;
Expand All @@ -203,4 +216,4 @@ ArticleCreatePage => test/functional/pages/ArticleCreatePage.groovy;
ArticleEditPage => test/functional/pages/ArticleEditPage.groovy;
ArticleShowPage => test/functional/pages/ArticleShowPage.groovy;
ArticlePage => test/functional/pages/ArticlesPage.groovy;
UserRegisterPage => test/functional/pages/UserRegisterPage.groovy;
UserRegisterPage => test/functional/pages/UserRegisterPage.groovy;
8 changes: 7 additions & 1 deletion ProductGeneration/featureModel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@
<feature min="0" max="1" name="Facebook" type="NONE" id="Facebook"></feature>

<feature min="0" max="1" name="Bibtex_Feature" type="NONE" id="Bibtex"></feature>


<feature min="0" max="1" name="TesePublication_Feature" type="NONE" id="TesePublication"></feature>

<feature min="0" max="1" name="ImportBibtex_Feature" type="NONE" id="ImportBibtex"></feature>

<feature min="0" max="1" name="Autofill_Feature" type="NONE" id="Autofill"></feature>

<feature min="0" max="1" name="Generate_Website" type="NONE" id="Website">
<featureGroup min="0" max="3" id="group1">
<feature min="0" max="1" name="XML" type="NONE" id="XML"></feature>
Expand Down
16 changes: 6 additions & 10 deletions ProductGeneration/hephaestus/project.properties
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name=rgms
feature-model=C:\Users\Rodrigo\Documents\GitHub\rgms/featureModel.xml

configuration-model=C:\Users\Rodrigo\Documents\GitHub\rgms/ck.xml

instance-model=C:\Users\Rodrigo\Documents\GitHub\rgms/instanceModel.xml

component-model=C:\Users\Rodrigo\Documents\GitHub\rgms/compModelTeste.txt

source-dir=C:\Users\Rodrigo\Documents\GitHub\rgms
target-dir=C:\Users\Rodrigo\Documents\GitHub\rgms_v1
feature-model=C:\spl\ultimate\rgms\ProductGeneration/featureModel.xml
configuration-model=C:\spl\ultimate\rgms\ProductGeneration/ck.xml
instance-model=C:\spl\ultimate\rgms\ProductGeneration/instanceModel.xml
component-model=C:\spl\ultimate\rgms\ProductGeneration/compModelTeste.txt
source-dir=C:\spl\ultimate\rgmsUltimateMiddleware
target-dir=C:\spl\ultimate\rgmsGenerated
6 changes: 6 additions & 0 deletions ProductGeneration/instanceModel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
<feature name="Facebook" type="NONE" id="Facebook"></feature>

<feature name="Bibtex_Feature" type="NONE" id="Bibtex"></feature>

<feature name="TesePublication_Feature" type="NONE" id="TesePublication"></feature>

<feature name="ImportBibtex_Feature" type="NONE" id="ImportBibtex"></feature>

<feature name="Autofill_Feature" type="NONE" id="Autofill"></feature>

<feature name="Generate_Website" type="NONE" id="Website">
<feature name="XML" type="NONE" id="XML"></feature>
Expand Down
1 change: 1 addition & 0 deletions application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ plugins.mail=1.0.1
plugins.pdf=0.6
plugins.shiro=1.1.4
plugins.shiro-ui=1.2.0-SNAPSHOT
plugins.twitter=0.2
1 change: 0 additions & 1 deletion grails-app/conf/BuildConfig.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ cloudbees.api.secret = ''

grails.project.dependency.resolution = {

//def gebVersion = "0.7.0"
def gebVersion = "0.7.1"
def seleniumVersion = "2.22.0"

Expand Down
4 changes: 2 additions & 2 deletions grails-app/conf/Config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ grails {
port = 465
//TODO: Before running, make sure that your email login and password appear below
//TODO: Before committing, make sure that the strings "LOGIN" and "PASSWORD" appear in place of your login and password
username = "LOGIN"
password = "PASSWORD"
username = "[email protected]"
password = "ufpe-cin-taes-2013.1"
props = ["mail.smtp.auth": "true",
"mail.smtp.socketFactory.port": "465",
"mail.smtp.socketFactory.class": "javax.net.ssl.SSLSocketFactory",
Expand Down
5 changes: 5 additions & 0 deletions grails-app/conf/UrlMappings.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ class UrlMappings {
}
}

"/bibtexFileController/upload" {
controller = "bibtexFile"
action = "upload"
}

"/"(controller: "Auth", action: "index")
"500"(view:'/error')
}
Expand Down
4 changes: 4 additions & 0 deletions grails-app/conf/spring/resources.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Place your Spring DSL code here
beans = {
localeResolver(org.springframework.web.servlet.i18n.SessionLocaleResolver) {
defaultLocale = new Locale("pt","BR")
java.util.Locale.setDefault(defaultLocale)
}
}
25 changes: 8 additions & 17 deletions grails-app/controllers/rgms/member/MemberController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class MemberController {
}

def save = {
// #if($Auth)
//#if($Auth)
if (!grailsApplication.config.grails.mail.username) {
throw new RuntimeException(message(code: 'mail.plugin.not.configured', 'default' : 'Mail plugin not configured'))
}
//#end
//#end

def memberInstance = new Member(params)
def username = memberInstance?.username
Expand All @@ -46,11 +46,6 @@ class MemberController {
}
memberInstance.passwordChangeRequiredOnNextLogon = true

//#if($History)
//saveHistory(memberInstance,memberInstance.status);//essa ? a maneira correta de chamar
//saveHistory();
//#end

if (!memberInstance.save(flush: true)) {
render(view: "create", model: [memberInstance: memberInstance])
return
Expand All @@ -60,9 +55,9 @@ class MemberController {
to memberInstance.email
from grailsApplication.config.grails.mail.username
subject "[GRMS] Your account was successfully created!"
//#literal()
//#literal()
body "Hello ${ memberInstance.name},\n\nYour account was successfully created!\n\nHere is your username: ${ username} and password: ${ password}\n\n${ createLink(absolute: true, uri: '/')}\n\nBest Regards,\nAdministrator of the Research Group Management System".toString()
//#end
//#end
}

flash.message = message(code: 'default.created.message', args: [message(code: 'member.label', default: 'Member'), memberInstance.id])
Expand Down Expand Up @@ -122,10 +117,9 @@ class MemberController {

if (!check_version(params.version, memberInstance)) return

//feature record
//#if($History)
//#if($History)
def status0 = memberInstance.status //pega o status anterior do usuario
//#end
//#end

memberInstance.properties = params //atualiza todos os parametros

Expand All @@ -134,9 +128,7 @@ class MemberController {
return
}

//feature record

//#if($History) //feature record
//#if($History)

String newStatus = memberInstance.status //pega o novo status

Expand All @@ -154,8 +146,7 @@ class MemberController {
}
saveHistory(memberInstance, newStatus) //refactoring - extract method
}
//end feature record
// #end
//#end

flash.message = message(code: 'default.updated.message', args: [message(code: 'member.label', default: 'Member'), memberInstance.id])
redirect(action: "show", id: memberInstance.id)
Expand Down
47 changes: 19 additions & 28 deletions grails-app/controllers/rgms/member/ResearchGroupController.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ package rgms.member


import org.springframework.dao.DataIntegrityViolationException

import rgms.news.News
import rgms.news.NewsController
import rgms.news.TwitterConnection
import twitter4j.Status

class ResearchGroupController {

Expand All @@ -23,8 +26,8 @@ class ResearchGroupController {
}

def save() {
def researchGroupInstance = new ResearchGroup(params)
if (!researchGroupInstance.save(flush: true)) {
def researchGroupInstance = new ResearchGroup(params)
if (!researchGroupInstance.save(flush: true)) {
render(view: "create", model: [researchGroupInstance: researchGroupInstance])
return
}
Expand All @@ -40,11 +43,12 @@ class ResearchGroupController {
return
}
//def cm = Membership.getCurrentMemberships(researchGroupInstance)
[researchGroupInstance: researchGroupInstance, publicationsInstance : listPublicationByGroup(), currentMemberships: Membership.getCurrentMemberships(researchGroupInstance)]
[researchGroupInstance: researchGroupInstance, publicationsInstance : listPublicationByGroup(), currentMemberships: Membership.getCurrentMemberships(researchGroupInstance), currentNews: News.getCurrentNews(researchGroupInstance)]
}

def edit() {
def researchGroupInstance = ResearchGroup.get(params.id)
assert researchGroupInstance != null
if (!researchGroupInstance) {
flash.message = message(code: 'default.not.found.message', args: [message(code: 'researchGroup.label', default: 'Research Group'), params.id])
//redirect(action: "list")
Expand Down Expand Up @@ -164,28 +168,15 @@ class ResearchGroupController {
return list

}
// def Set listPublicationByGroup(){
// def researchGroupInstance = ResearchGroup.get(params.id)
// //def g = rgms.ResearchGroup.findById(researchGroupInstance.id)
// def l = [] as Set
// def memberships = researchGroupInstance.memberships.findAll{
// researchGroupInstance.id = it.researchGroup.id
// }
//
// memberships.each{
//
// def dateJoined = it.dateJoined
// for(publication in it.member.publications)
// {
//
// if( publication.publicationDate.compareTo(it.dateJoined) > 0)
// {
// l.add(publication);
// }
// }
// }
// return l
//
// }


def updateNewsFromTwitter(){
def researchGroupInstance = ResearchGroup.get(params.id)
TwitterConnection twConn = new TwitterConnection()
List<Status> timeline = twConn.getTimeLine(researchGroupInstance.twitter)
timeline.each {
researchGroupInstance.addToNews(new News(description: it.getText(), date: it.getCreatedAt()))
}
researchGroupInstance.save()
redirect(action: "show", id: researchGroupInstance.id)
}
}
Loading

0 comments on commit 64505cc

Please sign in to comment.