├── .gitignore ├── LICENSE ├── README.md ├── log.roo ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── getit │ │ └── todoapp │ │ ├── domain │ │ ├── Feedback.java │ │ ├── Priority.java │ │ ├── Todo.java │ │ └── Userinfo.java │ │ ├── repository │ │ ├── TodoRepository.java │ │ └── UserRepository.java │ │ ├── rest │ │ ├── FeedbackController.java │ │ ├── TodoController.java │ │ └── UserinfoController.java │ │ └── service │ │ ├── CustomUserDeatilService.java │ │ ├── EmailService.java │ │ ├── Message.java │ │ ├── MyAuthenticationFailureHandler.java │ │ ├── MySavedRequestAwareAuthenticationSuccessHandler.java │ │ ├── PlainTextBasicAuthenticationEntryPoint.java │ │ ├── RestAuthenticationEntryPoint.java │ │ ├── SendGridEmailService.java │ │ ├── SendGridParameter.java │ │ ├── StatusResponse.java │ │ ├── TodoService.java │ │ ├── TodoServiceImpl.java │ │ ├── UserService.java │ │ └── UserServiceImpl.java ├── resources │ ├── META-INF │ │ ├── persistence.xml │ │ └── spring │ │ │ ├── applicationContext-jpa.xml │ │ │ ├── applicationContext-security.xml │ │ │ ├── applicationContext.xml │ │ │ ├── database.properties │ │ │ ├── email.properties │ │ │ └── sendgrid.properties │ └── log4j.properties └── webapp │ ├── WEB-INF │ ├── spring │ │ └── webmvc-config.xml │ └── web.xml │ └── resources │ ├── bootstrap │ ├── css │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap-responsive.min.css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ ├── bootstrap.js │ │ └── bootstrap.min.js │ ├── css │ ├── .gitignore │ └── app.css │ ├── images │ └── .gitignore │ ├── js │ ├── app.js │ ├── controllers │ │ ├── FeedbackController.js │ │ ├── HeaderController.js │ │ ├── TodoController.js │ │ └── UserController.js │ ├── directives.js │ ├── filters.js │ ├── lib │ │ ├── angular-sanitize.min.js │ │ ├── ui-bootstrap-custom-tpls-0.6.0.min.js │ │ └── underscore.js │ └── services.js │ └── templates │ ├── contact.html │ ├── download.html │ ├── feedback.html │ ├── home.html │ ├── index.html │ ├── login.html │ ├── signup.html │ └── todoes.html └── test └── java └── com └── getit └── todoapp └── domain ├── TodoDataOnDemand.java ├── TodoIntegrationTest.java ├── UserinfoDataOnDemand.java └── UserinfoIntegrationTest.java /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .project 3 | .settings 4 | .classpath 5 | .idea 6 | .springBeans 7 | todoapp.iml 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and 10 | distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by the copyright 13 | owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all other entities 16 | that control, are controlled by, or are under common control with that entity. 17 | For the purposes of this definition, "control" means (i) the power, direct or 18 | indirect, to cause the direction or management of such entity, whether by 19 | contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the 20 | outstanding shares, or (iii) beneficial ownership of such entity. 21 | 22 | "You" (or "Your") shall mean an individual or Legal Entity exercising 23 | permissions granted by this License. 24 | 25 | "Source" form shall mean the preferred form for making modifications, including 26 | but not limited to software source code, documentation source, and configuration 27 | files. 28 | 29 | "Object" form shall mean any form resulting from mechanical transformation or 30 | translation of a Source form, including but not limited to compiled object code, 31 | generated documentation, and conversions to other media types. 32 | 33 | "Work" shall mean the work of authorship, whether in Source or Object form, made 34 | available under the License, as indicated by a copyright notice that is included 35 | in or attached to the work (an example is provided in the Appendix below). 36 | 37 | "Derivative Works" shall mean any work, whether in Source or Object form, that 38 | is based on (or derived from) the Work and for which the editorial revisions, 39 | annotations, elaborations, or other modifications represent, as a whole, an 40 | original work of authorship. For the purposes of this License, Derivative Works 41 | shall not include works that remain separable from, or merely link (or bind by 42 | name) to the interfaces of, the Work and Derivative Works thereof. 43 | 44 | "Contribution" shall mean any work of authorship, including the original version 45 | of the Work and any modifications or additions to that Work or Derivative Works 46 | thereof, that is intentionally submitted to Licensor for inclusion in the Work 47 | by the copyright owner or by an individual or Legal Entity authorized to submit 48 | on behalf of the copyright owner. For the purposes of this definition, 49 | "submitted" means any form of electronic, verbal, or written communication sent 50 | to the Licensor or its representatives, including but not limited to 51 | communication on electronic mailing lists, source code control systems, and 52 | issue tracking systems that are managed by, or on behalf of, the Licensor for 53 | the purpose of discussing and improving the Work, but excluding communication 54 | that is conspicuously marked or otherwise designated in writing by the copyright 55 | owner as "Not a Contribution." 56 | 57 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf 58 | of whom a Contribution has been received by Licensor and subsequently 59 | incorporated within the Work. 60 | 61 | 2. Grant of Copyright License. 62 | 63 | Subject to the terms and conditions of this License, each Contributor hereby 64 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 65 | irrevocable copyright license to reproduce, prepare Derivative Works of, 66 | publicly display, publicly perform, sublicense, and distribute the Work and such 67 | Derivative Works in Source or Object form. 68 | 69 | 3. Grant of Patent License. 70 | 71 | Subject to the terms and conditions of this License, each Contributor hereby 72 | grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, 73 | irrevocable (except as stated in this section) patent license to make, have 74 | made, use, offer to sell, sell, import, and otherwise transfer the Work, where 75 | such license applies only to those patent claims licensable by such Contributor 76 | that are necessarily infringed by their Contribution(s) alone or by combination 77 | of their Contribution(s) with the Work to which such Contribution(s) was 78 | submitted. If You institute patent litigation against any entity (including a 79 | cross-claim or counterclaim in a lawsuit) alleging that the Work or a 80 | Contribution incorporated within the Work constitutes direct or contributory 81 | patent infringement, then any patent licenses granted to You under this License 82 | for that Work shall terminate as of the date such litigation is filed. 83 | 84 | 4. Redistribution. 85 | 86 | You may reproduce and distribute copies of the Work or Derivative Works thereof 87 | in any medium, with or without modifications, and in Source or Object form, 88 | provided that You meet the following conditions: 89 | 90 | You must give any other recipients of the Work or Derivative Works a copy of 91 | this License; and 92 | You must cause any modified files to carry prominent notices stating that You 93 | changed the files; and 94 | You must retain, in the Source form of any Derivative Works that You distribute, 95 | all copyright, patent, trademark, and attribution notices from the Source form 96 | of the Work, excluding those notices that do not pertain to any part of the 97 | Derivative Works; and 98 | If the Work includes a "NOTICE" text file as part of its distribution, then any 99 | Derivative Works that You distribute must include a readable copy of the 100 | attribution notices contained within such NOTICE file, excluding those notices 101 | that do not pertain to any part of the Derivative Works, in at least one of the 102 | following places: within a NOTICE text file distributed as part of the 103 | Derivative Works; within the Source form or documentation, if provided along 104 | with the Derivative Works; or, within a display generated by the Derivative 105 | Works, if and wherever such third-party notices normally appear. The contents of 106 | the NOTICE file are for informational purposes only and do not modify the 107 | License. You may add Your own attribution notices within Derivative Works that 108 | You distribute, alongside or as an addendum to the NOTICE text from the Work, 109 | provided that such additional attribution notices cannot be construed as 110 | modifying the License. 111 | You may add Your own copyright statement to Your modifications and may provide 112 | additional or different license terms and conditions for use, reproduction, or 113 | distribution of Your modifications, or for any such Derivative Works as a whole, 114 | provided Your use, reproduction, and distribution of the Work otherwise complies 115 | with the conditions stated in this License. 116 | 117 | 5. Submission of Contributions. 118 | 119 | Unless You explicitly state otherwise, any Contribution intentionally submitted 120 | for inclusion in the Work by You to the Licensor shall be under the terms and 121 | conditions of this License, without any additional terms or conditions. 122 | Notwithstanding the above, nothing herein shall supersede or modify the terms of 123 | any separate license agreement you may have executed with Licensor regarding 124 | such Contributions. 125 | 126 | 6. Trademarks. 127 | 128 | This License does not grant permission to use the trade names, trademarks, 129 | service marks, or product names of the Licensor, except as required for 130 | reasonable and customary use in describing the origin of the Work and 131 | reproducing the content of the NOTICE file. 132 | 133 | 7. Disclaimer of Warranty. 134 | 135 | Unless required by applicable law or agreed to in writing, Licensor provides the 136 | Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, 137 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, 138 | including, without limitation, any warranties or conditions of TITLE, 139 | NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are 140 | solely responsible for determining the appropriateness of using or 141 | redistributing the Work and assume any risks associated with Your exercise of 142 | permissions under this License. 143 | 144 | 8. Limitation of Liability. 145 | 146 | In no event and under no legal theory, whether in tort (including negligence), 147 | contract, or otherwise, unless required by applicable law (such as deliberate 148 | and grossly negligent acts) or agreed to in writing, shall any Contributor be 149 | liable to You for damages, including any direct, indirect, special, incidental, 150 | or consequential damages of any character arising as a result of this License or 151 | out of the use or inability to use the Work (including but not limited to 152 | damages for loss of goodwill, work stoppage, computer failure or malfunction, or 153 | any and all other commercial damages or losses), even if such Contributor has 154 | been advised of the possibility of such damages. 155 | 156 | 9. Accepting Warranty or Additional Liability. 157 | 158 | While redistributing the Work or Derivative Works thereof, You may choose to 159 | offer, and charge a fee for, acceptance of support, warranty, indemnity, or 160 | other liability obligations and/or rights consistent with this License. However, 161 | in accepting such obligations, You may act only on Your own behalf and on Your 162 | sole responsibility, not on behalf of any other Contributor, and only if You 163 | agree to indemnify, defend, and hold each Contributor harmless for any liability 164 | incurred by, or claims asserted against, such Contributor by reason of your 165 | accepting any such warranty or additional liability. 166 | 167 | END OF TERMS AND CONDITIONS 168 | 169 | APPENDIX: How to apply the Apache License to your work 170 | 171 | To apply the Apache License to your work, attach the following boilerplate 172 | notice, with the fields enclosed by brackets "[]" replaced with your own 173 | identifying information. (Don't include the brackets!) The text should be 174 | enclosed in the appropriate comment syntax for the file format. We also 175 | recommend that a file or class name and description of purpose be included on 176 | the same "printed page" as the copyright notice for easier identification within 177 | third-party archives. 178 | 179 | Copyright [yyyy] [name of copyright owner] 180 | 181 | Licensed under the Apache License, Version 2.0 (the "License"); 182 | you may not use this file except in compliance with the License. 183 | You may obtain a copy of the License at 184 | 185 | http://www.apache.org/licenses/LICENSE-2.0 186 | 187 | Unless required by applicable law or agreed to in writing, software 188 | distributed under the License is distributed on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 190 | See the License for the specific language governing permissions and 191 | limitations under the License. 192 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Todo app 2 | ========== 3 |
4 |
5 |

6 | This is an todo app developed by using spring rest. 7 |

8 |

9 | Angular js is used as client side framework 10 |

11 | 12 |
13 |
14 | 15 | 16 | Tools used : 17 | * [Spring roo](http://projects.spring.io/spring-roo/) 18 | * [Maven](http://maven.apache.org/) 19 | * [Angularjs](http://angularjs.org/) 20 | * [MySql](http://www.mysql.com/) 21 | * [SendGrid](http://sendgrid.com/) 22 | 23 | 24 | 25 | Prerequisites : 26 | 27 |

28 | * Mysql database 29 |

30 |

31 | Modify database.properties accordingly. 32 |

33 |

34 | Modify hibernate.hbm2ddl.auto field in persistence.xml accordingly. 35 |

36 | 37 |

38 | * Sendgrid 39 |

40 |

41 | Modify sendgrid.properties for sending emails. 42 |

43 | 44 | Steps to run : 45 | 46 | git clone https://github.com/kiranreddykasa/springrest-angularjs.git 47 | mvn clean package tomcat:run 48 | http://localhost:8080/todoapp/ 49 | 50 | License 51 | ------- 52 | 53 | [The Apache Software License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.txt) 54 | -------------------------------------------------------------------------------- /log.roo: -------------------------------------------------------------------------------- 1 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-17 19:19:53 2 | project --topLevelPackage com.getit.todoapp --projectName todoapp 3 | jpa setup --database HYPERSONIC_PERSISTENT --provider HIBERNATE 4 | entity jpa --class ~.domain.Todo --testAutomatically --activeRecord false 5 | field string --fieldName name --notNull 6 | field date --type java.util.Date --fieldName targetDate --notNull 7 | field boolean --fieldName isCompleted 8 | enum type --class ~.domain.Priority 9 | enum constant --name LOW 10 | enum constant --name MEDIUM 11 | enum constant --name HIGH 12 | field enum --type ~.domain.Priority --fieldName priority --class ~.domain.Todo 13 | repository jpa --interface ~.repository.TodoRepository --entity ~.domain.Todo 14 | service type --interface ~.service.TodoService --entity ~.domain.Todo 15 | json all 16 | web mvc json setup 17 | web mvc json all --package com.getit.todoapp.rest 18 | quit 19 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-09-17 19:31:19 20 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-17 20:03:37 21 | quit 22 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-09-17 20:03:50 23 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-19 12:52:46 24 | entity jpa --class ~.domain.Userinfo --testAutomatically --activeRecord false 25 | field string --fieldName userName --notNull --unique 26 | field string --fieldName email --notNull --unique 27 | field string --fieldName firstName 28 | field string --fieldName lastName 29 | field set --fieldName todoes --type ~.domain.Todo --cardinality ONE_TO_MANY --mappedBy user 30 | focus --class ~.domain.Todo 31 | // [failed] field reference --fieldName user --type ~.domain.Userinfo --cardinality MANY_TO_ONE 32 | field reference --fieldName userName --type ~.domain.Userinfo --cardinality MANY_TO_ONE 33 | json all 34 | web mvc json all 35 | web mvc json all --package rest 36 | web mvc json all --package ~.rest 37 | quit 38 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-09-19 13:18:32 39 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-19 13:20:16 40 | web mvc json all --package ~.rest 41 | repository jpa --entity ~.domain.Userinfo --interface ~.repository.UserRepository 42 | service type --interface ~.service.UserService --entity ~.domain.Userinfo 43 | web mvc json all --package ~.rest 44 | json all 45 | web mvc json all --package ~.rest 46 | web mvc json all --package ~.rest 47 | quit 48 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-09-19 13:25:04 49 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-19 17:38:10 50 | focus --class ~.domain.Userinfo 51 | field string --fieldName password --notNull 52 | quit 53 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2013-09-19 16:51:42 54 | jpa setup --database MYSQL --provider HIBERNATE 55 | quit 56 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log closed at 2013-09-19 16:54:58 57 | security setup 58 | quit 59 | // Spring Roo 1.2.4.RELEASE [rev 75337cf] log opened at 2014-01-16 00:46:23 60 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | com.getit.todoapp 6 | todoapp 7 | war 8 | 0.1.0.BUILD-SNAPSHOT 9 | todoapp 10 | 11 | 1.7.2 12 | 1.6 13 | UTF-8 14 | 1.2.4.RELEASE 15 | 1.7.5 16 | 3.2.9.RELEASE 17 | 3.1.0.RELEASE 18 | 19 | 20 | 21 | spring-maven-release 22 | Spring Maven Release Repository 23 | http://maven.springframework.org/release 24 | 25 | 26 | spring-maven-milestone 27 | Spring Maven Milestone Repository 28 | http://maven.springframework.org/milestone 29 | 30 | 31 | spring-roo-repository 32 | Spring Roo Repository 33 | http://spring-roo-repository.springsource.org/release 34 | 35 | 36 | 37 | 38 | spring-maven-release 39 | Spring Maven Release Repository 40 | http://maven.springframework.org/release 41 | 42 | 43 | spring-maven-milestone 44 | Spring Maven Milestone Repository 45 | http://maven.springframework.org/milestone 46 | 47 | 48 | spring-roo-repository 49 | Spring Roo Repository 50 | http://spring-roo-repository.springsource.org/release 51 | 52 | 53 | 54 | 55 | 56 | junit 57 | junit 58 | 4.11 59 | test 60 | 61 | 62 | log4j 63 | log4j 64 | 1.2.17 65 | 66 | 67 | org.slf4j 68 | slf4j-api 69 | ${slf4j.version} 70 | 71 | 72 | org.slf4j 73 | jcl-over-slf4j 74 | ${slf4j.version} 75 | 76 | 77 | org.slf4j 78 | slf4j-log4j12 79 | ${slf4j.version} 80 | 81 | 82 | org.aspectj 83 | aspectjrt 84 | ${aspectj.version} 85 | 86 | 87 | org.aspectj 88 | aspectjweaver 89 | ${aspectj.version} 90 | 91 | 92 | javax.servlet 93 | servlet-api 94 | 2.5 95 | provided 96 | 97 | 98 | net.sf.flexjson 99 | flexjson 100 | 2.1 101 | 102 | 103 | org.apache.commons 104 | commons-lang3 105 | 3.1 106 | 107 | 108 | 109 | org.springframework.roo 110 | org.springframework.roo.annotations 111 | ${roo.version} 112 | provided 113 | 114 | 115 | 116 | org.springframework 117 | spring-core 118 | ${spring.version} 119 | 120 | 121 | commons-logging 122 | commons-logging 123 | 124 | 125 | 126 | 127 | org.springframework 128 | spring-test 129 | ${spring.version} 130 | test 131 | 132 | 133 | org.springframework 134 | spring-context 135 | ${spring.version} 136 | 137 | 138 | org.springframework 139 | spring-context-support 140 | ${spring.version} 141 | 142 | 143 | org.springframework 144 | spring-aop 145 | ${spring.version} 146 | 147 | 148 | org.springframework 149 | spring-aspects 150 | ${spring.version} 151 | 152 | 153 | org.hibernate 154 | hibernate-core 155 | 4.2.2.Final 156 | 157 | 158 | org.hibernate 159 | hibernate-entitymanager 160 | 4.2.2.Final 161 | 162 | 163 | cglib 164 | cglib 165 | 166 | 167 | dom4j 168 | dom4j 169 | 170 | 171 | 172 | 173 | org.hibernate.javax.persistence 174 | hibernate-jpa-2.0-api 175 | 1.0.1.Final 176 | 177 | 178 | commons-collections 179 | commons-collections 180 | 3.2.2 181 | 182 | 183 | org.hibernate 184 | hibernate-validator 185 | 4.3.1.Final 186 | 187 | 188 | javax.validation 189 | validation-api 190 | 1.0.0.GA 191 | 192 | 193 | javax.transaction 194 | jta 195 | 1.1 196 | 197 | 198 | org.springframework 199 | spring-jdbc 200 | ${spring.version} 201 | 202 | 203 | org.springframework 204 | spring-orm 205 | ${spring.version} 206 | 207 | 208 | commons-pool 209 | commons-pool 210 | 1.5.6 211 | 212 | 213 | commons-dbcp 214 | commons-dbcp 215 | 1.4 216 | 217 | 218 | commons-logging 219 | commons-logging 220 | 221 | 222 | xml-apis 223 | xml-apis 224 | 225 | 226 | 227 | 228 | org.springframework.data 229 | spring-data-jpa 230 | 1.2.0.RELEASE 231 | 232 | 233 | org.springframework 234 | spring-webmvc 235 | ${spring.version} 236 | 237 | 238 | org.springframework.security 239 | spring-security-core 240 | ${spring-security.version} 241 | 242 | 243 | commons-logging 244 | commons-logging 245 | 246 | 247 | 248 | 249 | org.springframework.security 250 | spring-security-config 251 | ${spring-security.version} 252 | 253 | 254 | commons-logging 255 | commons-logging 256 | 257 | 258 | 259 | 260 | org.springframework.security 261 | spring-security-web 262 | ${spring-security.version} 263 | 264 | 265 | org.springframework.security 266 | spring-security-taglibs 267 | ${spring-security.version} 268 | 269 | 270 | mysql 271 | mysql-connector-java 272 | 5.1.18 273 | 274 | 275 | 276 | org.json 277 | json 278 | 20090211 279 | 280 | 281 | javax.mail 282 | mail 283 | 1.4.1 284 | 285 | 286 | 287 | 288 | 289 | org.apache.maven.plugins 290 | maven-war-plugin 291 | 2.2 292 | 293 | 294 | 295 | org.apache.maven.plugins 296 | maven-compiler-plugin 297 | 2.5.1 298 | 299 | ${java.version} 300 | ${java.version} 301 | ${project.build.sourceEncoding} 302 | 303 | 304 | 305 | org.codehaus.mojo 306 | aspectj-maven-plugin 307 | 1.4 308 | 309 | 310 | 312 | 313 | org.aspectj 314 | aspectjrt 315 | ${aspectj.version} 316 | 317 | 318 | org.aspectj 319 | aspectjtools 320 | ${aspectj.version} 321 | 322 | 323 | 324 | 325 | process-sources 326 | 327 | compile 328 | test-compile 329 | 330 | 331 | 332 | 333 | true 334 | 335 | 336 | org.springframework 337 | spring-aspects 338 | 339 | 340 | ${java.version} 341 | ${java.version} 342 | 346 | false 347 | 348 | 349 | 350 | org.apache.maven.plugins 351 | maven-resources-plugin 352 | 2.6 353 | 354 | ${project.build.sourceEncoding} 355 | 356 | 357 | 358 | org.apache.maven.plugins 359 | maven-surefire-plugin 360 | 2.12 361 | 362 | false 363 | true 364 | 365 | **/*_Roo_* 366 | 367 | 368 | 369 | 370 | org.apache.maven.plugins 371 | maven-assembly-plugin 372 | 2.3 373 | 374 | 375 | jar-with-dependencies 376 | 377 | 378 | 379 | 380 | org.apache.maven.plugins 381 | maven-deploy-plugin 382 | 2.7 383 | 384 | 385 | 386 | org.apache.maven.plugins 387 | maven-eclipse-plugin 388 | 2.7 389 | 390 | 391 | true 392 | false 393 | 2.0 394 | 395 | 396 | org.eclipse.ajdt.core.ajbuilder 397 | 398 | org.springframework.aspects 399 | 400 | 401 | 402 | org.springframework.ide.eclipse.core.springbuilder 403 | 404 | 405 | 406 | org.eclipse.ajdt.ui.ajnature 407 | com.springsource.sts.roo.core.nature 408 | org.springframework.ide.eclipse.core.springnature 409 | 410 | 411 | 412 | 413 | org.apache.maven.plugins 414 | maven-idea-plugin 415 | 2.2 416 | 417 | true 418 | true 419 | 420 | 421 | 422 | org.codehaus.mojo 423 | tomcat-maven-plugin 424 | 1.1 425 | 426 | 427 | org.mortbay.jetty 428 | jetty-maven-plugin 429 | 8.1.4.v20120524 430 | 431 | 432 | /${project.name} 433 | 434 | 435 | 436 | 437 | 438 | 439 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/domain/Feedback.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.domain; 2 | 3 | import flexjson.JSONDeserializer; 4 | 5 | public class Feedback { 6 | 7 | private String email; 8 | private String body; 9 | 10 | public String getEmail() { 11 | return email; 12 | } 13 | public void setEmail(String email) { 14 | this.email = email; 15 | } 16 | public String getBody() { 17 | return body; 18 | } 19 | public void setBody(String body) { 20 | this.body = body; 21 | } 22 | 23 | 24 | public static Feedback fromJsonToFeedback(String json) { 25 | return new JSONDeserializer().use(null, Feedback.class).deserialize(json); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/domain/Priority.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.domain; 2 | 3 | public enum Priority { 4 | 5 | LOW, MEDIUM, HIGH 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/domain/Todo.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.domain; 2 | import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 3 | import org.apache.commons.lang3.builder.ToStringStyle; 4 | import org.springframework.roo.addon.javabean.RooJavaBean; 5 | import org.springframework.roo.addon.jpa.entity.RooJpaEntity; 6 | import org.springframework.roo.addon.tostring.RooToString; 7 | import flexjson.JSONDeserializer; 8 | import flexjson.JSONSerializer; 9 | import flexjson.transformer.DateTransformer; 10 | import javax.validation.constraints.NotNull; 11 | import java.util.ArrayList; 12 | import java.util.Collection; 13 | import java.util.Date; 14 | import java.util.List; 15 | import javax.persistence.Column; 16 | import javax.persistence.Entity; 17 | import javax.persistence.GeneratedValue; 18 | import javax.persistence.GenerationType; 19 | import javax.persistence.Id; 20 | import javax.persistence.Temporal; 21 | import javax.persistence.TemporalType; 22 | import javax.persistence.Version; 23 | import org.springframework.format.annotation.DateTimeFormat; 24 | import javax.persistence.Enumerated; 25 | import org.springframework.roo.addon.json.RooJson; 26 | import javax.persistence.ManyToOne; 27 | 28 | @Entity 29 | @RooJavaBean 30 | @RooToString 31 | @RooJpaEntity 32 | @RooJson 33 | public class Todo { 34 | private static final String CLASS_EXTENSION = "*.class"; 35 | 36 | /** 37 | */ 38 | @NotNull 39 | private String name; 40 | 41 | /** 42 | */ 43 | @NotNull 44 | @Temporal(TemporalType.TIMESTAMP) 45 | @DateTimeFormat(style = "M-") 46 | private Date targetDate; 47 | 48 | /** 49 | */ 50 | private Boolean isCompleted; 51 | 52 | /** 53 | */ 54 | @Enumerated 55 | private Priority priority; 56 | 57 | /** 58 | */ 59 | @ManyToOne 60 | private Userinfo userName; 61 | 62 | @Id 63 | @GeneratedValue(strategy = GenerationType.AUTO) 64 | @Column(name = "id") 65 | private Long id; 66 | 67 | @Version 68 | @Column(name = "version") 69 | private Integer version; 70 | 71 | public String toJson() { 72 | return new JSONSerializer().exclude(CLASS_EXTENSION).transform(new DateTransformer("MM/dd/yyyy"), Date.class).serialize(this); 73 | } 74 | 75 | public String toJson(String[] fields) { 76 | return new JSONSerializer().include(fields).exclude(CLASS_EXTENSION).serialize(this); 77 | } 78 | 79 | public static Todo fromJsonToTodo(String json) { 80 | return new JSONDeserializer().use(null, Todo.class).deserialize(json); 81 | } 82 | 83 | public static String toJsonArray(Collection collection) { 84 | return new JSONSerializer().exclude(CLASS_EXTENSION).transform(new DateTransformer("MM/dd/yyyy"), Date.class).serialize(collection); 85 | } 86 | 87 | public static String toJsonArray(Collection collection, String[] fields) { 88 | return new JSONSerializer().include(fields).exclude(CLASS_EXTENSION).serialize(collection); 89 | } 90 | 91 | public static Collection fromJsonArrayToTodoes(String json) { 92 | return new JSONDeserializer>().use(null, ArrayList.class).use("values", Todo.class).deserialize(json); 93 | } 94 | 95 | 96 | 97 | public String toString() { 98 | return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE); 99 | } 100 | 101 | public Long getId() { 102 | return this.id; 103 | } 104 | 105 | public void setId(Long id) { 106 | this.id = id; 107 | } 108 | 109 | public Integer getVersion() { 110 | return this.version; 111 | } 112 | 113 | public void setVersion(Integer version) { 114 | this.version = version; 115 | } 116 | 117 | public String getName() { 118 | return this.name; 119 | } 120 | 121 | public void setName(String name) { 122 | this.name = name; 123 | } 124 | 125 | public Date getTargetDate() { 126 | return this.targetDate; 127 | } 128 | 129 | public void setTargetDate(Date targetDate) { 130 | this.targetDate = targetDate; 131 | } 132 | 133 | public Boolean getIsCompleted() { 134 | return this.isCompleted; 135 | } 136 | 137 | public void setIsCompleted(Boolean isCompleted) { 138 | this.isCompleted = isCompleted; 139 | } 140 | 141 | public Priority getPriority() { 142 | return this.priority; 143 | } 144 | 145 | public void setPriority(Priority priority) { 146 | this.priority = priority; 147 | } 148 | 149 | public Userinfo getUserName() { 150 | return this.userName; 151 | } 152 | 153 | public void setUserName(Userinfo userName) { 154 | this.userName = userName; 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/domain/Userinfo.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.domain; 2 | import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 3 | import org.apache.commons.lang3.builder.ToStringStyle; 4 | import org.springframework.roo.addon.javabean.RooJavaBean; 5 | import org.springframework.roo.addon.jpa.entity.RooJpaEntity; 6 | import org.springframework.roo.addon.tostring.RooToString; 7 | import flexjson.JSONDeserializer; 8 | import flexjson.JSONSerializer; 9 | import javax.persistence.Column; 10 | import javax.validation.constraints.NotNull; 11 | import java.util.ArrayList; 12 | import java.util.Collection; 13 | import java.util.HashSet; 14 | import java.util.List; 15 | import java.util.Set; 16 | import javax.persistence.CascadeType; 17 | import javax.persistence.Entity; 18 | import javax.persistence.GeneratedValue; 19 | import javax.persistence.GenerationType; 20 | import javax.persistence.Id; 21 | import javax.persistence.OneToMany; 22 | import javax.persistence.Version; 23 | import org.springframework.roo.addon.json.RooJson; 24 | 25 | @Entity 26 | @RooJavaBean 27 | @RooToString 28 | @RooJpaEntity 29 | @RooJson 30 | public class Userinfo { 31 | private static final String CLASS_EXTENSION = "*.class"; 32 | 33 | /** 34 | */ 35 | @NotNull 36 | @Column(unique = true) 37 | private String userName; 38 | 39 | /** 40 | */ 41 | @NotNull 42 | @Column(unique = true) 43 | private String email; 44 | 45 | /** 46 | */ 47 | private String firstName; 48 | 49 | /** 50 | */ 51 | private String lastName; 52 | 53 | /** 54 | */ 55 | @OneToMany(cascade = CascadeType.ALL, mappedBy = "userName") 56 | private Set todoes = new HashSet(); 57 | 58 | /** 59 | */ 60 | @NotNull 61 | private String password; 62 | 63 | @Id 64 | @GeneratedValue(strategy = GenerationType.AUTO) 65 | @Column(name = "id") 66 | private Long id; 67 | 68 | @Version 69 | @Column(name = "version") 70 | private Integer version; 71 | 72 | public String toString() { 73 | return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE); 74 | } 75 | 76 | public Long getId() { 77 | return this.id; 78 | } 79 | 80 | public void setId(Long id) { 81 | this.id = id; 82 | } 83 | 84 | public Integer getVersion() { 85 | return this.version; 86 | } 87 | 88 | public void setVersion(Integer version) { 89 | this.version = version; 90 | } 91 | 92 | public String getUserName() { 93 | return this.userName; 94 | } 95 | 96 | public void setUserName(String userName) { 97 | this.userName = userName; 98 | } 99 | 100 | public String getEmail() { 101 | return this.email; 102 | } 103 | 104 | public void setEmail(String email) { 105 | this.email = email; 106 | } 107 | 108 | public String getFirstName() { 109 | return this.firstName; 110 | } 111 | 112 | public void setFirstName(String firstName) { 113 | this.firstName = firstName; 114 | } 115 | 116 | public String getLastName() { 117 | return this.lastName; 118 | } 119 | 120 | public void setLastName(String lastName) { 121 | this.lastName = lastName; 122 | } 123 | 124 | public Set getTodoes() { 125 | return this.todoes; 126 | } 127 | 128 | public void setTodoes(Set todoes) { 129 | this.todoes = todoes; 130 | } 131 | 132 | public String getPassword() { 133 | return this.password; 134 | } 135 | 136 | public void setPassword(String password) { 137 | this.password = password; 138 | } 139 | 140 | public String toJson() { 141 | return new JSONSerializer().exclude(CLASS_EXTENSION).serialize(this); 142 | } 143 | 144 | public String toJson(String[] fields) { 145 | return new JSONSerializer().include(fields).exclude(CLASS_EXTENSION).serialize(this); 146 | } 147 | 148 | public static Userinfo fromJsonToUserinfo(String json) { 149 | return new JSONDeserializer().use(null, Userinfo.class).deserialize(json); 150 | } 151 | 152 | public static String toJsonArray(Collection collection) { 153 | return new JSONSerializer().exclude(CLASS_EXTENSION).serialize(collection); 154 | } 155 | 156 | public static String toJsonArray(Collection collection, String[] fields) { 157 | return new JSONSerializer().include(fields).exclude(CLASS_EXTENSION).serialize(collection); 158 | } 159 | 160 | public static Collection fromJsonArrayToUserinfoes(String json) { 161 | return new JSONDeserializer>().use(null, ArrayList.class).use("values", Userinfo.class).deserialize(json); 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/repository/TodoRepository.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.repository; 2 | import java.util.List; 3 | 4 | import org.springframework.data.jpa.repository.JpaRepository; 5 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 6 | import org.springframework.data.jpa.repository.Query; 7 | import org.springframework.roo.addon.layers.repository.jpa.RooJpaRepository; 8 | import org.springframework.stereotype.Repository; 9 | 10 | import com.getit.todoapp.domain.Todo; 11 | 12 | @Repository 13 | @RooJpaRepository(domainType = Todo.class) 14 | public interface TodoRepository extends JpaSpecificationExecutor, JpaRepository { 15 | 16 | @Query("select t from Todo t where t.userName.userName = ?1") 17 | List findTodosByUserName(String userName); 18 | 19 | @Query("select t from Todo t where t.userName.userName = ?1 and t.id= ?2") 20 | Todo findTodoByUserNameAndId(String userName,Long id); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/repository/UserRepository.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.repository; 2 | import java.util.List; 3 | 4 | import com.getit.todoapp.domain.Userinfo; 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.roo.addon.layers.repository.jpa.RooJpaRepository; 8 | import org.springframework.stereotype.Repository; 9 | 10 | @Repository 11 | @RooJpaRepository(domainType = Userinfo.class) 12 | public interface UserRepository extends JpaSpecificationExecutor, JpaRepository { 13 | 14 | List findByUserName(String userName); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/rest/FeedbackController.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.rest; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.http.HttpHeaders; 5 | import org.springframework.http.HttpStatus; 6 | import org.springframework.http.ResponseEntity; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | 12 | import com.getit.todoapp.domain.Feedback; 13 | import com.getit.todoapp.service.EmailService; 14 | import com.getit.todoapp.service.Message; 15 | 16 | @Controller 17 | @RequestMapping("/feedback") 18 | public class FeedbackController { 19 | 20 | @Autowired 21 | private EmailService emailService; 22 | 23 | @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") 24 | public ResponseEntity createFromJson(@RequestBody String json) { 25 | Feedback feedback = Feedback.fromJsonToFeedback(json); 26 | Message message=new Message(); 27 | message.setBody(feedback.getBody()); 28 | message.setReceiverEmail("kiranreddy2004@gmail.com"); 29 | message.setReceiverName("kiran"); 30 | message.setSenderEmail(feedback.getEmail()); 31 | message.setSubject("Todo : feedback"); 32 | 33 | emailService.send(message); 34 | HttpHeaders headers = new HttpHeaders(); 35 | headers.add("Content-Type", "application/json"); 36 | return new ResponseEntity(headers, HttpStatus.CREATED); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/rest/TodoController.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.rest; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.http.HttpStatus; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.roo.addon.web.mvc.controller.json.RooWebJson; 10 | import org.springframework.security.core.Authentication; 11 | import org.springframework.security.core.userdetails.User; 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.web.bind.annotation.PathVariable; 14 | import org.springframework.web.bind.annotation.RequestBody; 15 | import org.springframework.web.bind.annotation.RequestMapping; 16 | import org.springframework.web.bind.annotation.RequestMethod; 17 | import org.springframework.web.bind.annotation.ResponseBody; 18 | 19 | import com.getit.todoapp.domain.Todo; 20 | import com.getit.todoapp.domain.Userinfo; 21 | import com.getit.todoapp.service.TodoService; 22 | import com.getit.todoapp.service.UserService; 23 | 24 | 25 | @RooWebJson(jsonObject = Todo.class) 26 | @Controller 27 | @RequestMapping("/todoes") 28 | public class TodoController { 29 | private static final String APPLICATION_JSON = "application/json"; 30 | private static final String CONTENT_TYPE = "Content-Type"; 31 | 32 | @Autowired 33 | private UserService userService; 34 | 35 | @Autowired 36 | private TodoService todoService; 37 | 38 | 39 | @RequestMapping(method = RequestMethod.DELETE, headers = "Accept=application/json") 40 | public ResponseEntity deleteAllTodos(Authentication authentication) { 41 | User user=(User) authentication.getPrincipal(); 42 | List todos = todoService.findTodosByUserName(user.getUsername()); 43 | HttpHeaders headers = new HttpHeaders(); 44 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 45 | for (Todo todo : todos) { 46 | todo.setUserName(null); 47 | todoService.deleteTodo(todo); 48 | } 49 | return new ResponseEntity(headers, HttpStatus.OK); 50 | } 51 | 52 | @RequestMapping(value = "/{id}", method = RequestMethod.PUT, headers = "Accept=application/json") 53 | public ResponseEntity updateFromJson(@RequestBody String json, @PathVariable("id") Long id) { 54 | HttpHeaders headers = new HttpHeaders(); 55 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 56 | Todo todo = Todo.fromJsonToTodo(json.toString()); 57 | if (todoService.updateTodo(todo) == null) { 58 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 59 | } 60 | return new ResponseEntity(headers, HttpStatus.OK); 61 | } 62 | 63 | @RequestMapping(value = "/{id}", method = RequestMethod.GET, headers = "Accept=application/json") 64 | @ResponseBody 65 | public ResponseEntity showJson(@PathVariable("id") Long id) { 66 | Todo todo = todoService.findTodo(id); 67 | HttpHeaders headers = new HttpHeaders(); 68 | headers.add(CONTENT_TYPE, "application/json; charset=utf-8"); 69 | if (todo == null) { 70 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 71 | } 72 | return new ResponseEntity(todo.toJson(), headers, HttpStatus.OK); 73 | } 74 | 75 | @RequestMapping(headers = "Accept=application/json") 76 | @ResponseBody 77 | public ResponseEntity listJson(Authentication authentication) { 78 | HttpHeaders headers = new HttpHeaders(); 79 | headers.add(CONTENT_TYPE, "application/json; charset=utf-8"); 80 | User user=(User) authentication.getPrincipal(); 81 | List result = todoService.findTodosByUserName(user.getUsername()); 82 | return new ResponseEntity(Todo.toJsonArray(result), headers, HttpStatus.OK); 83 | } 84 | 85 | @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") 86 | public ResponseEntity createFromJson(@RequestBody String json,Authentication authentication) { 87 | Todo todo = Todo.fromJsonToTodo(json); 88 | User user=(User) authentication.getPrincipal(); 89 | Userinfo userinfo=userService.findByUserName(user.getUsername()).get(0); 90 | todo.setUserName(userinfo); 91 | todoService.saveTodo(todo); 92 | HttpHeaders headers = new HttpHeaders(); 93 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 94 | return new ResponseEntity(headers, HttpStatus.CREATED); 95 | } 96 | 97 | @RequestMapping(value = "/jsonArray", method = RequestMethod.POST, headers = "Accept=application/json") 98 | public ResponseEntity createFromJsonArray(@RequestBody String json) { 99 | for (Todo todo: Todo.fromJsonArrayToTodoes(json)) { 100 | todoService.saveTodo(todo); 101 | } 102 | HttpHeaders headers = new HttpHeaders(); 103 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 104 | return new ResponseEntity(headers, HttpStatus.CREATED); 105 | } 106 | 107 | @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json") 108 | public ResponseEntity deleteFromJson(@PathVariable("id") Long id,Authentication authentication) { 109 | 110 | User user=(User) authentication.getPrincipal(); 111 | Todo todo = todoService.findTodoByUserNameAndId(user.getUsername(),id); 112 | HttpHeaders headers = new HttpHeaders(); 113 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 114 | if (todo == null) { 115 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 116 | } 117 | todo.setUserName(null); 118 | todoService.deleteTodo(todo); 119 | return new ResponseEntity(headers, HttpStatus.OK); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/rest/UserinfoController.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.rest; 2 | import com.getit.todoapp.domain.Userinfo; 3 | import com.getit.todoapp.service.UserService; 4 | import java.util.List; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.http.HttpHeaders; 7 | import org.springframework.http.HttpStatus; 8 | import org.springframework.http.ResponseEntity; 9 | import org.springframework.roo.addon.web.mvc.controller.json.RooWebJson; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.web.bind.annotation.PathVariable; 12 | import org.springframework.web.bind.annotation.RequestBody; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestMethod; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | @RooWebJson(jsonObject = Userinfo.class) 18 | @Controller 19 | @RequestMapping("/userinfoes") 20 | public class UserinfoController { 21 | private static final String APPLICATION_JSON = "application/json"; 22 | private static final String CONTENT_TYPE = "Content-Type"; 23 | 24 | @Autowired 25 | private UserService userService; 26 | 27 | @RequestMapping(value = "/{id}", method = RequestMethod.GET, headers = "Accept=application/json") 28 | @ResponseBody 29 | public ResponseEntity showJson(@PathVariable("id") Long id) { 30 | Userinfo userinfo = userService.findUserinfo(id); 31 | HttpHeaders headers = new HttpHeaders(); 32 | headers.add(CONTENT_TYPE, "application/json; charset=utf-8"); 33 | if (userinfo == null) { 34 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 35 | } 36 | return new ResponseEntity(userinfo.toJson(), headers, HttpStatus.OK); 37 | } 38 | 39 | @RequestMapping(headers = "Accept=application/json") 40 | @ResponseBody 41 | public ResponseEntity listJson() { 42 | HttpHeaders headers = new HttpHeaders(); 43 | headers.add(CONTENT_TYPE, "application/json; charset=utf-8"); 44 | List result = userService.findAllUserinfoes(); 45 | return new ResponseEntity(Userinfo.toJsonArray(result), headers, HttpStatus.OK); 46 | } 47 | 48 | @RequestMapping(method = RequestMethod.POST, headers = "Accept=application/json") 49 | public ResponseEntity createFromJson(@RequestBody String json) { 50 | Userinfo userinfo = Userinfo.fromJsonToUserinfo(json); 51 | userService.saveUserinfo(userinfo); 52 | HttpHeaders headers = new HttpHeaders(); 53 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 54 | return new ResponseEntity(headers, HttpStatus.CREATED); 55 | } 56 | 57 | @RequestMapping(value = "/jsonArray", method = RequestMethod.POST, headers = "Accept=application/json") 58 | public ResponseEntity createFromJsonArray(@RequestBody String json) { 59 | for (Userinfo userinfo: Userinfo.fromJsonArrayToUserinfoes(json)) { 60 | userService.saveUserinfo(userinfo); 61 | } 62 | HttpHeaders headers = new HttpHeaders(); 63 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 64 | return new ResponseEntity(headers, HttpStatus.CREATED); 65 | } 66 | 67 | @RequestMapping(value = "/{id}", method = RequestMethod.PUT, headers = "Accept=application/json") 68 | public ResponseEntity updateFromJson(@RequestBody String json, @PathVariable("id") Long id) { 69 | HttpHeaders headers = new HttpHeaders(); 70 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 71 | Userinfo userinfo = Userinfo.fromJsonToUserinfo(json); 72 | if (userService.updateUserinfo(userinfo) == null) { 73 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 74 | } 75 | return new ResponseEntity(headers, HttpStatus.OK); 76 | } 77 | 78 | @RequestMapping(value = "/{id}", method = RequestMethod.DELETE, headers = "Accept=application/json") 79 | public ResponseEntity deleteFromJson(@PathVariable("id") Long id) { 80 | Userinfo userinfo = userService.findUserinfo(id); 81 | HttpHeaders headers = new HttpHeaders(); 82 | headers.add(CONTENT_TYPE, APPLICATION_JSON); 83 | if (userinfo == null) { 84 | return new ResponseEntity(headers, HttpStatus.NOT_FOUND); 85 | } 86 | userService.deleteUserinfo(userinfo); 87 | return new ResponseEntity(headers, HttpStatus.OK); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/CustomUserDeatilService.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.security.core.GrantedAuthority; 9 | import org.springframework.security.core.authority.SimpleGrantedAuthority; 10 | import org.springframework.security.core.userdetails.User; 11 | import org.springframework.security.core.userdetails.UserDetails; 12 | import org.springframework.security.core.userdetails.UserDetailsService; 13 | import org.springframework.security.core.userdetails.UsernameNotFoundException; 14 | 15 | import com.getit.todoapp.domain.Userinfo; 16 | 17 | public class CustomUserDeatilService implements UserDetailsService { 18 | 19 | public static final String ROLE_USER = "ROLE_USER"; 20 | public static final String ROLE_ADMINISTRATOR = "ROLE_ADMIN"; 21 | 22 | @Autowired 23 | private UserService userService; 24 | 25 | private final ThreadLocal currentUser = new ThreadLocal(); 26 | 27 | @Override 28 | public UserDetails loadUserByUsername(String username) 29 | throws UsernameNotFoundException { 30 | 31 | try { 32 | 33 | Collection userAuthorities = new ArrayList(); 34 | userAuthorities.add(new SimpleGrantedAuthority(ROLE_USER)); 35 | 36 | List userinfos = userService.findByUserName(username); 37 | 38 | Userinfo userinfo = userinfos.get(0); 39 | 40 | User user = new User(userinfo.getUserName(), 41 | userinfo.getPassword(), true, true, true, true, 42 | userAuthorities); 43 | currentUser.set(user); 44 | return user; 45 | 46 | } catch (Exception e) { 47 | throw new UsernameNotFoundException("Username " + username 48 | + " not found!"); 49 | } 50 | 51 | } 52 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/EmailService.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | public interface EmailService { 4 | StatusResponse send(Message message); 5 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/Message.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.io.Serializable; 4 | 5 | public class Message implements Serializable { 6 | 7 | private static final long serialVersionUID = -4093981756240899937L; 8 | private String senderName; 9 | private String senderEmail; 10 | private String ccEmail; 11 | private String subject; 12 | private String body; 13 | private String receiverName; 14 | private String receiverEmail; 15 | 16 | public Message() { 17 | super(); 18 | } 19 | 20 | public Message(String senderName, String senderEmail, String ccEmail, 21 | String subject, String body, String receiverName, 22 | String receiverEmail) { 23 | super(); 24 | this.senderName = senderName; 25 | this.senderEmail = senderEmail; 26 | this.ccEmail = ccEmail; 27 | this.subject = subject; 28 | this.body = body; 29 | this.receiverName = receiverName; 30 | this.receiverEmail = receiverEmail; 31 | } 32 | 33 | public String getSenderName() { 34 | return senderName; 35 | } 36 | 37 | public void setSenderName(String senderName) { 38 | this.senderName = senderName; 39 | } 40 | 41 | public String getSenderEmail() { 42 | return senderEmail; 43 | } 44 | 45 | public void setSenderEmail(String senderEmail) { 46 | this.senderEmail = senderEmail; 47 | } 48 | 49 | public String getCcEmail() { 50 | return ccEmail; 51 | } 52 | 53 | public void setCcEmail(String ccEmail) { 54 | this.ccEmail = ccEmail; 55 | } 56 | 57 | public String getSubject() { 58 | return subject; 59 | } 60 | 61 | public void setSubject(String subject) { 62 | this.subject = subject; 63 | } 64 | 65 | public String getBody() { 66 | return body; 67 | } 68 | 69 | public void setBody(String body) { 70 | this.body = body; 71 | } 72 | 73 | public String getReceiverName() { 74 | return receiverName; 75 | } 76 | 77 | public void setReceiverName(String receiverName) { 78 | this.receiverName = receiverName; 79 | } 80 | 81 | public String getReceiverEmail() { 82 | return receiverEmail; 83 | } 84 | 85 | public void setReceiverEmail(String receiverEmail) { 86 | this.receiverEmail = receiverEmail; 87 | } 88 | 89 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/MyAuthenticationFailureHandler.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.json.JSONException; 11 | import org.json.JSONObject; 12 | import org.springframework.security.core.AuthenticationException; 13 | import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; 14 | 15 | public class MyAuthenticationFailureHandler extends 16 | SimpleUrlAuthenticationFailureHandler { 17 | 18 | @Override 19 | public void onAuthenticationFailure(HttpServletRequest request, 20 | HttpServletResponse response, AuthenticationException exception) 21 | throws IOException, ServletException { 22 | 23 | 24 | JSONObject jsonObject=new JSONObject(); 25 | System.out.println(exception.getMessage()); 26 | try { 27 | jsonObject.put("message", "Invalid username"); 28 | jsonObject.put("status", "Not okay"); 29 | 30 | 31 | } catch (JSONException e) { 32 | e.printStackTrace(); 33 | } 34 | 35 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED,jsonObject.toString()); 36 | 37 | } 38 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/MySavedRequestAwareAuthenticationSuccessHandler.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | 4 | import java.io.IOException; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.security.core.Authentication; 11 | import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; 12 | import org.springframework.security.web.savedrequest.HttpSessionRequestCache; 13 | import org.springframework.security.web.savedrequest.RequestCache; 14 | import org.springframework.security.web.savedrequest.SavedRequest; 15 | import org.springframework.util.StringUtils; 16 | 17 | public class MySavedRequestAwareAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { 18 | 19 | private RequestCache requestCache = new HttpSessionRequestCache(); 20 | 21 | @Override 22 | public void onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws ServletException, IOException { 23 | final SavedRequest savedRequest = requestCache.getRequest(request, response); 24 | 25 | if (savedRequest == null) { 26 | clearAuthenticationAttributes(request); 27 | return; 28 | } 29 | final String targetUrlParameter = getTargetUrlParameter(); 30 | if (isAlwaysUseDefaultTargetUrl() || (targetUrlParameter != null && StringUtils.hasText(request.getParameter(targetUrlParameter)))) { 31 | requestCache.removeRequest(request, response); 32 | clearAuthenticationAttributes(request); 33 | return; 34 | } 35 | 36 | clearAuthenticationAttributes(request); 37 | 38 | // Use the DefaultSavedRequest URL 39 | // final String targetUrl = savedRequest.getRedirectUrl(); 40 | // logger.debug("Redirecting to DefaultSavedRequest Url: " + targetUrl); 41 | // getRedirectStrategy().sendRedirect(request, response, targetUrl); 42 | } 43 | 44 | public void setRequestCache(final RequestCache requestCache) { 45 | this.requestCache = requestCache; 46 | } 47 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/PlainTextBasicAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import org.springframework.security.core.AuthenticationException; 11 | import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint; 12 | 13 | public class PlainTextBasicAuthenticationEntryPoint extends 14 | BasicAuthenticationEntryPoint { 15 | 16 | @Override 17 | public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { 18 | response.addHeader("Access-Control-Allow-Origin", "null"); 19 | response.addHeader("WWW-Authenticate", "Basic realm=\"" + getRealmName() + "\""); 20 | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); 21 | PrintWriter writer = response.getWriter(); 22 | writer.println("HTTP Status " + HttpServletResponse.SC_UNAUTHORIZED + " - " + authException.getMessage()); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/RestAuthenticationEntryPoint.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.http.HttpServletRequest; 6 | import javax.servlet.http.HttpServletResponse; 7 | 8 | import org.springframework.security.core.AuthenticationException; 9 | import org.springframework.security.web.AuthenticationEntryPoint; 10 | import org.springframework.stereotype.Component; 11 | 12 | /** 13 | * The Entry Point will not redirect to any sort of Login - it will return the 14 | * 401 15 | */ 16 | @Component 17 | public final class RestAuthenticationEntryPoint implements 18 | AuthenticationEntryPoint { 19 | 20 | @Override 21 | public void commence(final HttpServletRequest request, 22 | final HttpServletResponse response, 23 | final AuthenticationException authException) throws IOException { 24 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized"); 25 | } 26 | 27 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/SendGridEmailService.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import org.apache.log4j.Logger; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.stereotype.Service; 6 | import org.springframework.util.LinkedMultiValueMap; 7 | import org.springframework.util.MultiValueMap; 8 | import org.springframework.web.client.RestTemplate; 9 | 10 | @Service 11 | public class SendGridEmailService implements EmailService { 12 | 13 | protected static Logger logger = Logger.getLogger("service"); 14 | private final RestTemplate restTemplate = new RestTemplate(); 15 | 16 | @Value("${sendgrid.api.user}") 17 | private String sendgridApiUser; 18 | 19 | @Value("${sendgrid.api.key}") 20 | private String sendgridApiKey; 21 | 22 | @Override 23 | public StatusResponse send(Message message) { 24 | try { 25 | MultiValueMap vars = new LinkedMultiValueMap(); 26 | vars.add(SendGridParameter.API_USER, sendgridApiUser); 27 | vars.add(SendGridParameter.API_KEY, sendgridApiKey); 28 | vars.add(SendGridParameter.SENDER_NAME, message.getSenderName()); 29 | vars.add(SendGridParameter.SENDER_EMAIL, message.getSenderEmail()); 30 | vars.add(SendGridParameter.BLIND_COPY_EMAIL, message.getCcEmail()); 31 | vars.add(SendGridParameter.SUBJECT, message.getSubject()); 32 | vars.add(SendGridParameter.TEXT, ""); 33 | vars.add(SendGridParameter.HTML, message.getBody()); 34 | vars.add(SendGridParameter.RECEIVER_EMAIL, 35 | message.getReceiverEmail()); 36 | vars.add(SendGridParameter.RECEIVER_NAME, message.getReceiverName()); 37 | 38 | restTemplate.postForLocation(SendGridParameter.URL, vars); 39 | } catch (Exception ex) { 40 | logger.error(ex); 41 | return new StatusResponse(false, "An error has occurred!"); 42 | } 43 | 44 | return new StatusResponse(true, "Message sent"); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/SendGridParameter.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | public interface SendGridParameter { 4 | public static final String URL = "http://sendgrid.com/api/mail.send.json"; 5 | public static final String API_USER = "api_user"; 6 | public static final String API_KEY = "api_key"; 7 | public static final String RECEIVER_EMAIL = "to"; 8 | public static final String RECEIVER_NAME = "toname"; 9 | public static final String SUBJECT = "subject"; 10 | public static final String TEXT = "text"; 11 | public static final String HTML = "html"; 12 | public static final String SENDER_EMAIL = "from"; 13 | public static final String SENDER_NAME = "fromname"; 14 | public static final String BLIND_COPY_EMAIL = "bcc"; 15 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/StatusResponse.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | /** 7 | * A POJO containing the status of an action and a {@link List} of messages. 8 | * This is mainly used as a DTO for the presentation layer 9 | */ 10 | public class StatusResponse { 11 | 12 | private Boolean success; 13 | private final List message; 14 | 15 | public StatusResponse() { 16 | this.message = new ArrayList(); 17 | } 18 | 19 | public StatusResponse(Boolean success) { 20 | super(); 21 | this.success = success; 22 | this.message = new ArrayList(); 23 | } 24 | 25 | public StatusResponse(Boolean success, String message) { 26 | super(); 27 | this.success = success; 28 | this.message = new ArrayList(); 29 | this.message.add(message); 30 | } 31 | 32 | public StatusResponse(Boolean success, List message) { 33 | super(); 34 | this.success = success; 35 | this.message = message; 36 | } 37 | 38 | public Boolean getSuccess() { 39 | return success; 40 | } 41 | 42 | public void setSuccess(Boolean success) { 43 | this.success = success; 44 | } 45 | 46 | public List getMessage() { 47 | return message; 48 | } 49 | 50 | public void setMessage(String message) { 51 | this.message.add(message); 52 | } 53 | 54 | @Override 55 | public String toString() { 56 | StringBuilder sb = new StringBuilder(); 57 | for (String mess : message) { 58 | sb.append(mess + ", "); 59 | } 60 | 61 | return "StatusResponse [success=" + success + ", message=" 62 | + sb.toString() + "]"; 63 | } 64 | } -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/TodoService.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | import com.getit.todoapp.domain.Todo; 3 | 4 | import java.util.List; 5 | 6 | import org.springframework.roo.addon.layers.service.RooService; 7 | 8 | @RooService(domainTypes = { com.getit.todoapp.domain.Todo.class }) 9 | public interface TodoService { 10 | 11 | public abstract long countAllTodoes(); 12 | 13 | 14 | public abstract void deleteTodo(Todo todo); 15 | 16 | 17 | public abstract Todo findTodo(Long id); 18 | 19 | 20 | public abstract List findAllTodoes(); 21 | 22 | 23 | public abstract List findTodoEntries(int firstResult, int maxResults); 24 | 25 | 26 | public abstract void saveTodo(Todo todo); 27 | 28 | 29 | public abstract Todo updateTodo(Todo todo); 30 | 31 | public abstract List findTodosByUserName(String userName); 32 | 33 | public abstract Todo findTodoByUserNameAndId(String userName,Long id); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/TodoServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import com.getit.todoapp.domain.Todo; 4 | import com.getit.todoapp.repository.TodoRepository; 5 | 6 | import java.util.List; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | import org.springframework.transaction.annotation.Transactional; 11 | 12 | @Service 13 | @Transactional 14 | public class TodoServiceImpl implements TodoService { 15 | 16 | @Autowired 17 | private TodoRepository todoRepository; 18 | 19 | public long countAllTodoes() { 20 | return todoRepository.count(); 21 | } 22 | 23 | public void deleteTodo(Todo todo) { 24 | todoRepository.delete(todo); 25 | } 26 | 27 | public Todo findTodo(Long id) { 28 | return todoRepository.findOne(id); 29 | } 30 | 31 | public List findAllTodoes() { 32 | return todoRepository.findAll(); 33 | } 34 | 35 | public List findTodoEntries(int firstResult, int maxResults) { 36 | return todoRepository.findAll(new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); 37 | } 38 | 39 | public void saveTodo(Todo todo) { 40 | todoRepository.save(todo); 41 | } 42 | 43 | public Todo updateTodo(Todo todo) { 44 | return todoRepository.save(todo); 45 | } 46 | 47 | @Override 48 | public List findTodosByUserName(String userName) { 49 | 50 | return todoRepository.findTodosByUserName(userName); 51 | } 52 | 53 | @Override 54 | public Todo findTodoByUserNameAndId(String userName,Long id) { 55 | 56 | return todoRepository.findTodoByUserNameAndId(userName,id); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.roo.addon.layers.service.RooService; 6 | 7 | import com.getit.todoapp.domain.Userinfo; 8 | 9 | @RooService(domainTypes = { com.getit.todoapp.domain.Userinfo.class }) 10 | public interface UserService { 11 | 12 | List findByUserName(String userName); 13 | 14 | public abstract long countAllUserinfoes(); 15 | 16 | 17 | public abstract void deleteUserinfo(Userinfo userinfo); 18 | 19 | 20 | public abstract Userinfo findUserinfo(Long id); 21 | 22 | 23 | public abstract List findAllUserinfoes(); 24 | 25 | 26 | public abstract List findUserinfoEntries(int firstResult, int maxResults); 27 | 28 | 29 | public abstract void saveUserinfo(Userinfo userinfo); 30 | 31 | 32 | public abstract Userinfo updateUserinfo(Userinfo userinfo); 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/getit/todoapp/service/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.getit.todoapp.service; 2 | 3 | import java.util.List; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Service; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import com.getit.todoapp.domain.Userinfo; 9 | import com.getit.todoapp.repository.UserRepository; 10 | 11 | @Service 12 | @Transactional 13 | public class UserServiceImpl implements UserService { 14 | 15 | @Autowired 16 | private UserRepository userRepository; 17 | 18 | public List findByUserName(String userName){ 19 | 20 | return userRepository.findByUserName(userName); 21 | } 22 | 23 | public long countAllUserinfoes() { 24 | return userRepository.count(); 25 | } 26 | 27 | public void deleteUserinfo(Userinfo userinfo) { 28 | userRepository.delete(userinfo); 29 | } 30 | 31 | public Userinfo findUserinfo(Long id) { 32 | return userRepository.findOne(id); 33 | } 34 | 35 | public List findAllUserinfoes() { 36 | return userRepository.findAll(); 37 | } 38 | 39 | public List findUserinfoEntries(int firstResult, int maxResults) { 40 | return userRepository.findAll(new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent(); 41 | } 42 | 43 | public void saveUserinfo(Userinfo userinfo) { 44 | userRepository.save(userinfo); 45 | } 46 | 47 | public Userinfo updateUserinfo(Userinfo userinfo) { 48 | return userRepository.save(userinfo); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/persistence.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | org.hibernate.ejb.HibernatePersistence 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/applicationContext-jpa.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/applicationContext-security.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 6 | 10 | 11 | 21 | 22 | 38 | 39 | 41 | 43 | 44 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 60 | 61 | 62 | 64 | 67 | 68 | 69 | 70 | 71 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/database.properties: -------------------------------------------------------------------------------- 1 | #Updated at Thu Sep 19 16:54:10 GMT+05:30 2013 2 | #Thu Sep 19 16:54:10 GMT+05:30 2013 3 | database.driverClassName=com.mysql.jdbc.Driver 4 | database.url=jdbc\:mysql\://10.44.71.109\:3306/todo 5 | database.username=root 6 | database.password=root 7 | -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/email.properties: -------------------------------------------------------------------------------- 1 | email.host=smtp.sendgrid.net 2 | email.password=************ 3 | email.port=25 4 | email.username=************ -------------------------------------------------------------------------------- /src/main/resources/META-INF/spring/sendgrid.properties: -------------------------------------------------------------------------------- 1 | sendgrid.api.user=************ 2 | sendgrid.api.key=************ -------------------------------------------------------------------------------- /src/main/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootLogger=error, stdout 2 | 3 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | 6 | # Print the date in ISO 8601 format 7 | log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n 8 | 9 | log4j.appender.R=org.apache.log4j.RollingFileAppender 10 | log4j.appender.R.File=application.log 11 | 12 | log4j.appender.R.MaxFileSize=100KB 13 | # Keep one backup file 14 | log4j.appender.R.MaxBackupIndex=1 15 | 16 | log4j.appender.R.layout=org.apache.log4j.PatternLayout 17 | log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 18 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/spring/webmvc-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | todoapp 6 | 7 | Roo generated todoapp application 8 | 9 | 10 | 11 | contextConfigLocation 12 | classpath*:META-INF/spring/applicationContext*.xml 13 | 14 | 15 | 16 | CharacterEncodingFilter 17 | org.springframework.web.filter.CharacterEncodingFilter 18 | 19 | encoding 20 | UTF-8 21 | 22 | 23 | forceEncoding 24 | true 25 | 26 | 27 | 28 | 29 | 30 | 31 | HttpMethodFilter 32 | org.springframework.web.filter.HiddenHttpMethodFilter 33 | 34 | 35 | CharacterEncodingFilter 36 | /* 37 | 38 | 39 | 40 | HttpMethodFilter 41 | /* 42 | 43 | 44 | 45 | 46 | org.springframework.web.context.ContextLoaderListener 47 | 48 | 49 | 50 | 51 | todoapp 52 | org.springframework.web.servlet.DispatcherServlet 53 | 54 | contextConfigLocation 55 | WEB-INF/spring/webmvc-config.xml 56 | 57 | 1 58 | 59 | 60 | 61 | todoapp 62 | / 63 | 64 | 65 | 66 | 67 | springSecurityFilterChain 68 | org.springframework.web.filter.DelegatingFilterProxy 69 | 70 | 71 | 72 | springSecurityFilterChain 73 | /* 74 | 75 | 76 | -------------------------------------------------------------------------------- /src/main/webapp/resources/bootstrap/css/bootstrap-responsive.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.2.2 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */ 10 | 11 | @-ms-viewport { 12 | width: device-width; 13 | } 14 | 15 | .clearfix { 16 | *zoom: 1; 17 | } 18 | 19 | .clearfix:before, 20 | .clearfix:after { 21 | display: table; 22 | line-height: 0; 23 | content: ""; 24 | } 25 | 26 | .clearfix:after { 27 | clear: both; 28 | } 29 | 30 | .hide-text { 31 | font: 0/0 a; 32 | color: transparent; 33 | text-shadow: none; 34 | background-color: transparent; 35 | border: 0; 36 | } 37 | 38 | .input-block-level { 39 | display: block; 40 | width: 100%; 41 | min-height: 30px; 42 | -webkit-box-sizing: border-box; 43 | -moz-box-sizing: border-box; 44 | box-sizing: border-box; 45 | } 46 | 47 | .hidden { 48 | display: none; 49 | visibility: hidden; 50 | } 51 | 52 | .visible-phone { 53 | display: none !important; 54 | } 55 | 56 | .visible-tablet { 57 | display: none !important; 58 | } 59 | 60 | .hidden-desktop { 61 | display: none !important; 62 | } 63 | 64 | .visible-desktop { 65 | display: inherit !important; 66 | } 67 | 68 | @media (min-width: 768px) and (max-width: 979px) { 69 | .hidden-desktop { 70 | display: inherit !important; 71 | } 72 | .visible-desktop { 73 | display: none !important ; 74 | } 75 | .visible-tablet { 76 | display: inherit !important; 77 | } 78 | .hidden-tablet { 79 | display: none !important; 80 | } 81 | } 82 | 83 | @media (max-width: 767px) { 84 | .hidden-desktop { 85 | display: inherit !important; 86 | } 87 | .visible-desktop { 88 | display: none !important; 89 | } 90 | .visible-phone { 91 | display: inherit !important; 92 | } 93 | .hidden-phone { 94 | display: none !important; 95 | } 96 | } 97 | 98 | @media (min-width: 1200px) { 99 | .row { 100 | margin-left: -30px; 101 | *zoom: 1; 102 | } 103 | .row:before, 104 | .row:after { 105 | display: table; 106 | line-height: 0; 107 | content: ""; 108 | } 109 | .row:after { 110 | clear: both; 111 | } 112 | [class*="span"] { 113 | float: left; 114 | min-height: 1px; 115 | margin-left: 30px; 116 | } 117 | .container, 118 | .navbar-static-top .container, 119 | .navbar-fixed-top .container, 120 | .navbar-fixed-bottom .container { 121 | width: 1170px; 122 | } 123 | .span12 { 124 | width: 1170px; 125 | } 126 | .span11 { 127 | width: 1070px; 128 | } 129 | .span10 { 130 | width: 970px; 131 | } 132 | .span9 { 133 | width: 870px; 134 | } 135 | .span8 { 136 | width: 770px; 137 | } 138 | .span7 { 139 | width: 670px; 140 | } 141 | .span6 { 142 | width: 570px; 143 | } 144 | .span5 { 145 | width: 470px; 146 | } 147 | .span4 { 148 | width: 370px; 149 | } 150 | .span3 { 151 | width: 270px; 152 | } 153 | .span2 { 154 | width: 170px; 155 | } 156 | .span1 { 157 | width: 70px; 158 | } 159 | .offset12 { 160 | margin-left: 1230px; 161 | } 162 | .offset11 { 163 | margin-left: 1130px; 164 | } 165 | .offset10 { 166 | margin-left: 1030px; 167 | } 168 | .offset9 { 169 | margin-left: 930px; 170 | } 171 | .offset8 { 172 | margin-left: 830px; 173 | } 174 | .offset7 { 175 | margin-left: 730px; 176 | } 177 | .offset6 { 178 | margin-left: 630px; 179 | } 180 | .offset5 { 181 | margin-left: 530px; 182 | } 183 | .offset4 { 184 | margin-left: 430px; 185 | } 186 | .offset3 { 187 | margin-left: 330px; 188 | } 189 | .offset2 { 190 | margin-left: 230px; 191 | } 192 | .offset1 { 193 | margin-left: 130px; 194 | } 195 | .row-fluid { 196 | width: 100%; 197 | *zoom: 1; 198 | } 199 | .row-fluid:before, 200 | .row-fluid:after { 201 | display: table; 202 | line-height: 0; 203 | content: ""; 204 | } 205 | .row-fluid:after { 206 | clear: both; 207 | } 208 | .row-fluid [class*="span"] { 209 | display: block; 210 | float: left; 211 | width: 100%; 212 | min-height: 30px; 213 | margin-left: 2.564102564102564%; 214 | *margin-left: 2.5109110747408616%; 215 | -webkit-box-sizing: border-box; 216 | -moz-box-sizing: border-box; 217 | box-sizing: border-box; 218 | } 219 | .row-fluid [class*="span"]:first-child { 220 | margin-left: 0; 221 | } 222 | .row-fluid .controls-row [class*="span"] + [class*="span"] { 223 | margin-left: 2.564102564102564%; 224 | } 225 | .row-fluid .span12 { 226 | width: 100%; 227 | *width: 99.94680851063829%; 228 | } 229 | .row-fluid .span11 { 230 | width: 91.45299145299145%; 231 | *width: 91.39979996362975%; 232 | } 233 | .row-fluid .span10 { 234 | width: 82.90598290598291%; 235 | *width: 82.8527914166212%; 236 | } 237 | .row-fluid .span9 { 238 | width: 74.35897435897436%; 239 | *width: 74.30578286961266%; 240 | } 241 | .row-fluid .span8 { 242 | width: 65.81196581196582%; 243 | *width: 65.75877432260411%; 244 | } 245 | .row-fluid .span7 { 246 | width: 57.26495726495726%; 247 | *width: 57.21176577559556%; 248 | } 249 | .row-fluid .span6 { 250 | width: 48.717948717948715%; 251 | *width: 48.664757228587014%; 252 | } 253 | .row-fluid .span5 { 254 | width: 40.17094017094017%; 255 | *width: 40.11774868157847%; 256 | } 257 | .row-fluid .span4 { 258 | width: 31.623931623931625%; 259 | *width: 31.570740134569924%; 260 | } 261 | .row-fluid .span3 { 262 | width: 23.076923076923077%; 263 | *width: 23.023731587561375%; 264 | } 265 | .row-fluid .span2 { 266 | width: 14.52991452991453%; 267 | *width: 14.476723040552828%; 268 | } 269 | .row-fluid .span1 { 270 | width: 5.982905982905983%; 271 | *width: 5.929714493544281%; 272 | } 273 | .row-fluid .offset12 { 274 | margin-left: 105.12820512820512%; 275 | *margin-left: 105.02182214948171%; 276 | } 277 | .row-fluid .offset12:first-child { 278 | margin-left: 102.56410256410257%; 279 | *margin-left: 102.45771958537915%; 280 | } 281 | .row-fluid .offset11 { 282 | margin-left: 96.58119658119658%; 283 | *margin-left: 96.47481360247316%; 284 | } 285 | .row-fluid .offset11:first-child { 286 | margin-left: 94.01709401709402%; 287 | *margin-left: 93.91071103837061%; 288 | } 289 | .row-fluid .offset10 { 290 | margin-left: 88.03418803418803%; 291 | *margin-left: 87.92780505546462%; 292 | } 293 | .row-fluid .offset10:first-child { 294 | margin-left: 85.47008547008548%; 295 | *margin-left: 85.36370249136206%; 296 | } 297 | .row-fluid .offset9 { 298 | margin-left: 79.48717948717949%; 299 | *margin-left: 79.38079650845607%; 300 | } 301 | .row-fluid .offset9:first-child { 302 | margin-left: 76.92307692307693%; 303 | *margin-left: 76.81669394435352%; 304 | } 305 | .row-fluid .offset8 { 306 | margin-left: 70.94017094017094%; 307 | *margin-left: 70.83378796144753%; 308 | } 309 | .row-fluid .offset8:first-child { 310 | margin-left: 68.37606837606839%; 311 | *margin-left: 68.26968539734497%; 312 | } 313 | .row-fluid .offset7 { 314 | margin-left: 62.393162393162385%; 315 | *margin-left: 62.28677941443899%; 316 | } 317 | .row-fluid .offset7:first-child { 318 | margin-left: 59.82905982905982%; 319 | *margin-left: 59.72267685033642%; 320 | } 321 | .row-fluid .offset6 { 322 | margin-left: 53.84615384615384%; 323 | *margin-left: 53.739770867430444%; 324 | } 325 | .row-fluid .offset6:first-child { 326 | margin-left: 51.28205128205128%; 327 | *margin-left: 51.175668303327875%; 328 | } 329 | .row-fluid .offset5 { 330 | margin-left: 45.299145299145295%; 331 | *margin-left: 45.1927623204219%; 332 | } 333 | .row-fluid .offset5:first-child { 334 | margin-left: 42.73504273504273%; 335 | *margin-left: 42.62865975631933%; 336 | } 337 | .row-fluid .offset4 { 338 | margin-left: 36.75213675213675%; 339 | *margin-left: 36.645753773413354%; 340 | } 341 | .row-fluid .offset4:first-child { 342 | margin-left: 34.18803418803419%; 343 | *margin-left: 34.081651209310785%; 344 | } 345 | .row-fluid .offset3 { 346 | margin-left: 28.205128205128204%; 347 | *margin-left: 28.0987452264048%; 348 | } 349 | .row-fluid .offset3:first-child { 350 | margin-left: 25.641025641025642%; 351 | *margin-left: 25.53464266230224%; 352 | } 353 | .row-fluid .offset2 { 354 | margin-left: 19.65811965811966%; 355 | *margin-left: 19.551736679396257%; 356 | } 357 | .row-fluid .offset2:first-child { 358 | margin-left: 17.094017094017094%; 359 | *margin-left: 16.98763411529369%; 360 | } 361 | .row-fluid .offset1 { 362 | margin-left: 11.11111111111111%; 363 | *margin-left: 11.004728132387708%; 364 | } 365 | .row-fluid .offset1:first-child { 366 | margin-left: 8.547008547008547%; 367 | *margin-left: 8.440625568285142%; 368 | } 369 | input, 370 | textarea, 371 | .uneditable-input { 372 | margin-left: 0; 373 | } 374 | .controls-row [class*="span"] + [class*="span"] { 375 | margin-left: 30px; 376 | } 377 | input.span12, 378 | textarea.span12, 379 | .uneditable-input.span12 { 380 | width: 1156px; 381 | } 382 | input.span11, 383 | textarea.span11, 384 | .uneditable-input.span11 { 385 | width: 1056px; 386 | } 387 | input.span10, 388 | textarea.span10, 389 | .uneditable-input.span10 { 390 | width: 956px; 391 | } 392 | input.span9, 393 | textarea.span9, 394 | .uneditable-input.span9 { 395 | width: 856px; 396 | } 397 | input.span8, 398 | textarea.span8, 399 | .uneditable-input.span8 { 400 | width: 756px; 401 | } 402 | input.span7, 403 | textarea.span7, 404 | .uneditable-input.span7 { 405 | width: 656px; 406 | } 407 | input.span6, 408 | textarea.span6, 409 | .uneditable-input.span6 { 410 | width: 556px; 411 | } 412 | input.span5, 413 | textarea.span5, 414 | .uneditable-input.span5 { 415 | width: 456px; 416 | } 417 | input.span4, 418 | textarea.span4, 419 | .uneditable-input.span4 { 420 | width: 356px; 421 | } 422 | input.span3, 423 | textarea.span3, 424 | .uneditable-input.span3 { 425 | width: 256px; 426 | } 427 | input.span2, 428 | textarea.span2, 429 | .uneditable-input.span2 { 430 | width: 156px; 431 | } 432 | input.span1, 433 | textarea.span1, 434 | .uneditable-input.span1 { 435 | width: 56px; 436 | } 437 | .thumbnails { 438 | margin-left: -30px; 439 | } 440 | .thumbnails > li { 441 | margin-left: 30px; 442 | } 443 | .row-fluid .thumbnails { 444 | margin-left: 0; 445 | } 446 | } 447 | 448 | @media (min-width: 768px) and (max-width: 979px) { 449 | .row { 450 | margin-left: -20px; 451 | *zoom: 1; 452 | } 453 | .row:before, 454 | .row:after { 455 | display: table; 456 | line-height: 0; 457 | content: ""; 458 | } 459 | .row:after { 460 | clear: both; 461 | } 462 | [class*="span"] { 463 | float: left; 464 | min-height: 1px; 465 | margin-left: 20px; 466 | } 467 | .container, 468 | .navbar-static-top .container, 469 | .navbar-fixed-top .container, 470 | .navbar-fixed-bottom .container { 471 | width: 724px; 472 | } 473 | .span12 { 474 | width: 724px; 475 | } 476 | .span11 { 477 | width: 662px; 478 | } 479 | .span10 { 480 | width: 600px; 481 | } 482 | .span9 { 483 | width: 538px; 484 | } 485 | .span8 { 486 | width: 476px; 487 | } 488 | .span7 { 489 | width: 414px; 490 | } 491 | .span6 { 492 | width: 352px; 493 | } 494 | .span5 { 495 | width: 290px; 496 | } 497 | .span4 { 498 | width: 228px; 499 | } 500 | .span3 { 501 | width: 166px; 502 | } 503 | .span2 { 504 | width: 104px; 505 | } 506 | .span1 { 507 | width: 42px; 508 | } 509 | .offset12 { 510 | margin-left: 764px; 511 | } 512 | .offset11 { 513 | margin-left: 702px; 514 | } 515 | .offset10 { 516 | margin-left: 640px; 517 | } 518 | .offset9 { 519 | margin-left: 578px; 520 | } 521 | .offset8 { 522 | margin-left: 516px; 523 | } 524 | .offset7 { 525 | margin-left: 454px; 526 | } 527 | .offset6 { 528 | margin-left: 392px; 529 | } 530 | .offset5 { 531 | margin-left: 330px; 532 | } 533 | .offset4 { 534 | margin-left: 268px; 535 | } 536 | .offset3 { 537 | margin-left: 206px; 538 | } 539 | .offset2 { 540 | margin-left: 144px; 541 | } 542 | .offset1 { 543 | margin-left: 82px; 544 | } 545 | .row-fluid { 546 | width: 100%; 547 | *zoom: 1; 548 | } 549 | .row-fluid:before, 550 | .row-fluid:after { 551 | display: table; 552 | line-height: 0; 553 | content: ""; 554 | } 555 | .row-fluid:after { 556 | clear: both; 557 | } 558 | .row-fluid [class*="span"] { 559 | display: block; 560 | float: left; 561 | width: 100%; 562 | min-height: 30px; 563 | margin-left: 2.7624309392265194%; 564 | *margin-left: 2.709239449864817%; 565 | -webkit-box-sizing: border-box; 566 | -moz-box-sizing: border-box; 567 | box-sizing: border-box; 568 | } 569 | .row-fluid [class*="span"]:first-child { 570 | margin-left: 0; 571 | } 572 | .row-fluid .controls-row [class*="span"] + [class*="span"] { 573 | margin-left: 2.7624309392265194%; 574 | } 575 | .row-fluid .span12 { 576 | width: 100%; 577 | *width: 99.94680851063829%; 578 | } 579 | .row-fluid .span11 { 580 | width: 91.43646408839778%; 581 | *width: 91.38327259903608%; 582 | } 583 | .row-fluid .span10 { 584 | width: 82.87292817679558%; 585 | *width: 82.81973668743387%; 586 | } 587 | .row-fluid .span9 { 588 | width: 74.30939226519337%; 589 | *width: 74.25620077583166%; 590 | } 591 | .row-fluid .span8 { 592 | width: 65.74585635359117%; 593 | *width: 65.69266486422946%; 594 | } 595 | .row-fluid .span7 { 596 | width: 57.18232044198895%; 597 | *width: 57.12912895262725%; 598 | } 599 | .row-fluid .span6 { 600 | width: 48.61878453038674%; 601 | *width: 48.56559304102504%; 602 | } 603 | .row-fluid .span5 { 604 | width: 40.05524861878453%; 605 | *width: 40.00205712942283%; 606 | } 607 | .row-fluid .span4 { 608 | width: 31.491712707182323%; 609 | *width: 31.43852121782062%; 610 | } 611 | .row-fluid .span3 { 612 | width: 22.92817679558011%; 613 | *width: 22.87498530621841%; 614 | } 615 | .row-fluid .span2 { 616 | width: 14.3646408839779%; 617 | *width: 14.311449394616199%; 618 | } 619 | .row-fluid .span1 { 620 | width: 5.801104972375691%; 621 | *width: 5.747913483013988%; 622 | } 623 | .row-fluid .offset12 { 624 | margin-left: 105.52486187845304%; 625 | *margin-left: 105.41847889972962%; 626 | } 627 | .row-fluid .offset12:first-child { 628 | margin-left: 102.76243093922652%; 629 | *margin-left: 102.6560479605031%; 630 | } 631 | .row-fluid .offset11 { 632 | margin-left: 96.96132596685082%; 633 | *margin-left: 96.8549429881274%; 634 | } 635 | .row-fluid .offset11:first-child { 636 | margin-left: 94.1988950276243%; 637 | *margin-left: 94.09251204890089%; 638 | } 639 | .row-fluid .offset10 { 640 | margin-left: 88.39779005524862%; 641 | *margin-left: 88.2914070765252%; 642 | } 643 | .row-fluid .offset10:first-child { 644 | margin-left: 85.6353591160221%; 645 | *margin-left: 85.52897613729868%; 646 | } 647 | .row-fluid .offset9 { 648 | margin-left: 79.8342541436464%; 649 | *margin-left: 79.72787116492299%; 650 | } 651 | .row-fluid .offset9:first-child { 652 | margin-left: 77.07182320441989%; 653 | *margin-left: 76.96544022569647%; 654 | } 655 | .row-fluid .offset8 { 656 | margin-left: 71.2707182320442%; 657 | *margin-left: 71.16433525332079%; 658 | } 659 | .row-fluid .offset8:first-child { 660 | margin-left: 68.50828729281768%; 661 | *margin-left: 68.40190431409427%; 662 | } 663 | .row-fluid .offset7 { 664 | margin-left: 62.70718232044199%; 665 | *margin-left: 62.600799341718584%; 666 | } 667 | .row-fluid .offset7:first-child { 668 | margin-left: 59.94475138121547%; 669 | *margin-left: 59.838368402492065%; 670 | } 671 | .row-fluid .offset6 { 672 | margin-left: 54.14364640883978%; 673 | *margin-left: 54.037263430116376%; 674 | } 675 | .row-fluid .offset6:first-child { 676 | margin-left: 51.38121546961326%; 677 | *margin-left: 51.27483249088986%; 678 | } 679 | .row-fluid .offset5 { 680 | margin-left: 45.58011049723757%; 681 | *margin-left: 45.47372751851417%; 682 | } 683 | .row-fluid .offset5:first-child { 684 | margin-left: 42.81767955801105%; 685 | *margin-left: 42.71129657928765%; 686 | } 687 | .row-fluid .offset4 { 688 | margin-left: 37.01657458563536%; 689 | *margin-left: 36.91019160691196%; 690 | } 691 | .row-fluid .offset4:first-child { 692 | margin-left: 34.25414364640884%; 693 | *margin-left: 34.14776066768544%; 694 | } 695 | .row-fluid .offset3 { 696 | margin-left: 28.45303867403315%; 697 | *margin-left: 28.346655695309746%; 698 | } 699 | .row-fluid .offset3:first-child { 700 | margin-left: 25.69060773480663%; 701 | *margin-left: 25.584224756083227%; 702 | } 703 | .row-fluid .offset2 { 704 | margin-left: 19.88950276243094%; 705 | *margin-left: 19.783119783707537%; 706 | } 707 | .row-fluid .offset2:first-child { 708 | margin-left: 17.12707182320442%; 709 | *margin-left: 17.02068884448102%; 710 | } 711 | .row-fluid .offset1 { 712 | margin-left: 11.32596685082873%; 713 | *margin-left: 11.219583872105325%; 714 | } 715 | .row-fluid .offset1:first-child { 716 | margin-left: 8.56353591160221%; 717 | *margin-left: 8.457152932878806%; 718 | } 719 | input, 720 | textarea, 721 | .uneditable-input { 722 | margin-left: 0; 723 | } 724 | .controls-row [class*="span"] + [class*="span"] { 725 | margin-left: 20px; 726 | } 727 | input.span12, 728 | textarea.span12, 729 | .uneditable-input.span12 { 730 | width: 710px; 731 | } 732 | input.span11, 733 | textarea.span11, 734 | .uneditable-input.span11 { 735 | width: 648px; 736 | } 737 | input.span10, 738 | textarea.span10, 739 | .uneditable-input.span10 { 740 | width: 586px; 741 | } 742 | input.span9, 743 | textarea.span9, 744 | .uneditable-input.span9 { 745 | width: 524px; 746 | } 747 | input.span8, 748 | textarea.span8, 749 | .uneditable-input.span8 { 750 | width: 462px; 751 | } 752 | input.span7, 753 | textarea.span7, 754 | .uneditable-input.span7 { 755 | width: 400px; 756 | } 757 | input.span6, 758 | textarea.span6, 759 | .uneditable-input.span6 { 760 | width: 338px; 761 | } 762 | input.span5, 763 | textarea.span5, 764 | .uneditable-input.span5 { 765 | width: 276px; 766 | } 767 | input.span4, 768 | textarea.span4, 769 | .uneditable-input.span4 { 770 | width: 214px; 771 | } 772 | input.span3, 773 | textarea.span3, 774 | .uneditable-input.span3 { 775 | width: 152px; 776 | } 777 | input.span2, 778 | textarea.span2, 779 | .uneditable-input.span2 { 780 | width: 90px; 781 | } 782 | input.span1, 783 | textarea.span1, 784 | .uneditable-input.span1 { 785 | width: 28px; 786 | } 787 | } 788 | 789 | @media (max-width: 767px) { 790 | body { 791 | padding-right: 20px; 792 | padding-left: 20px; 793 | } 794 | .navbar-fixed-top, 795 | .navbar-fixed-bottom, 796 | .navbar-static-top { 797 | margin-right: -20px; 798 | margin-left: -20px; 799 | } 800 | .container-fluid { 801 | padding: 0; 802 | } 803 | .dl-horizontal dt { 804 | float: none; 805 | width: auto; 806 | clear: none; 807 | text-align: left; 808 | } 809 | .dl-horizontal dd { 810 | margin-left: 0; 811 | } 812 | .container { 813 | width: auto; 814 | } 815 | .row-fluid { 816 | width: 100%; 817 | } 818 | .row, 819 | .thumbnails { 820 | margin-left: 0; 821 | } 822 | .thumbnails > li { 823 | float: none; 824 | margin-left: 0; 825 | } 826 | [class*="span"], 827 | .uneditable-input[class*="span"], 828 | .row-fluid [class*="span"] { 829 | display: block; 830 | float: none; 831 | width: 100%; 832 | margin-left: 0; 833 | -webkit-box-sizing: border-box; 834 | -moz-box-sizing: border-box; 835 | box-sizing: border-box; 836 | } 837 | .span12, 838 | .row-fluid .span12 { 839 | width: 100%; 840 | -webkit-box-sizing: border-box; 841 | -moz-box-sizing: border-box; 842 | box-sizing: border-box; 843 | } 844 | .row-fluid [class*="offset"]:first-child { 845 | margin-left: 0; 846 | } 847 | .input-large, 848 | .input-xlarge, 849 | .input-xxlarge, 850 | input[class*="span"], 851 | select[class*="span"], 852 | textarea[class*="span"], 853 | .uneditable-input { 854 | display: block; 855 | width: 100%; 856 | min-height: 30px; 857 | -webkit-box-sizing: border-box; 858 | -moz-box-sizing: border-box; 859 | box-sizing: border-box; 860 | } 861 | .input-prepend input, 862 | .input-append input, 863 | .input-prepend input[class*="span"], 864 | .input-append input[class*="span"] { 865 | display: inline-block; 866 | width: auto; 867 | } 868 | .controls-row [class*="span"] + [class*="span"] { 869 | margin-left: 0; 870 | } 871 | .modal { 872 | position: fixed; 873 | top: 20px; 874 | right: 20px; 875 | left: 20px; 876 | width: auto; 877 | margin: 0; 878 | } 879 | .modal.fade { 880 | top: -100px; 881 | } 882 | .modal.fade.in { 883 | top: 20px; 884 | } 885 | } 886 | 887 | @media (max-width: 480px) { 888 | .nav-collapse { 889 | -webkit-transform: translate3d(0, 0, 0); 890 | } 891 | .page-header h1 small { 892 | display: block; 893 | line-height: 20px; 894 | } 895 | input[type="checkbox"], 896 | input[type="radio"] { 897 | border: 1px solid #ccc; 898 | } 899 | .form-horizontal .control-label { 900 | float: none; 901 | width: auto; 902 | padding-top: 0; 903 | text-align: left; 904 | } 905 | .form-horizontal .controls { 906 | margin-left: 0; 907 | } 908 | .form-horizontal .control-list { 909 | padding-top: 0; 910 | } 911 | .form-horizontal .form-actions { 912 | padding-right: 10px; 913 | padding-left: 10px; 914 | } 915 | .media .pull-left, 916 | .media .pull-right { 917 | display: block; 918 | float: none; 919 | margin-bottom: 10px; 920 | } 921 | .media-object { 922 | margin-right: 0; 923 | margin-left: 0; 924 | } 925 | .modal { 926 | top: 10px; 927 | right: 10px; 928 | left: 10px; 929 | } 930 | .modal-header .close { 931 | padding: 10px; 932 | margin: -10px; 933 | } 934 | .carousel-caption { 935 | position: static; 936 | } 937 | } 938 | 939 | @media (max-width: 979px) { 940 | body { 941 | padding-top: 0; 942 | } 943 | .navbar-fixed-top, 944 | .navbar-fixed-bottom { 945 | position: static; 946 | } 947 | .navbar-fixed-top { 948 | margin-bottom: 20px; 949 | } 950 | .navbar-fixed-bottom { 951 | margin-top: 20px; 952 | } 953 | .navbar-fixed-top .navbar-inner, 954 | .navbar-fixed-bottom .navbar-inner { 955 | padding: 5px; 956 | } 957 | .navbar .container { 958 | width: auto; 959 | padding: 0; 960 | } 961 | .navbar .brand { 962 | padding-right: 10px; 963 | padding-left: 10px; 964 | margin: 0 0 0 -5px; 965 | } 966 | .nav-collapse { 967 | clear: both; 968 | } 969 | .nav-collapse .nav { 970 | float: none; 971 | margin: 0 0 10px; 972 | } 973 | .nav-collapse .nav > li { 974 | float: none; 975 | } 976 | .nav-collapse .nav > li > a { 977 | margin-bottom: 2px; 978 | } 979 | .nav-collapse .nav > .divider-vertical { 980 | display: none; 981 | } 982 | .nav-collapse .nav .nav-header { 983 | color: #777777; 984 | text-shadow: none; 985 | } 986 | .nav-collapse .nav > li > a, 987 | .nav-collapse .dropdown-menu a { 988 | padding: 9px 15px; 989 | font-weight: bold; 990 | color: #777777; 991 | -webkit-border-radius: 3px; 992 | -moz-border-radius: 3px; 993 | border-radius: 3px; 994 | } 995 | .nav-collapse .btn { 996 | padding: 4px 10px 4px; 997 | font-weight: normal; 998 | -webkit-border-radius: 4px; 999 | -moz-border-radius: 4px; 1000 | border-radius: 4px; 1001 | } 1002 | .nav-collapse .dropdown-menu li + li a { 1003 | margin-bottom: 2px; 1004 | } 1005 | .nav-collapse .nav > li > a:hover, 1006 | .nav-collapse .dropdown-menu a:hover { 1007 | background-color: #f2f2f2; 1008 | } 1009 | .navbar-inverse .nav-collapse .nav > li > a, 1010 | .navbar-inverse .nav-collapse .dropdown-menu a { 1011 | color: #999999; 1012 | } 1013 | .navbar-inverse .nav-collapse .nav > li > a:hover, 1014 | .navbar-inverse .nav-collapse .dropdown-menu a:hover { 1015 | background-color: #111111; 1016 | } 1017 | .nav-collapse.in .btn-group { 1018 | padding: 0; 1019 | margin-top: 5px; 1020 | } 1021 | .nav-collapse .dropdown-menu { 1022 | position: static; 1023 | top: auto; 1024 | left: auto; 1025 | display: none; 1026 | float: none; 1027 | max-width: none; 1028 | padding: 0; 1029 | margin: 0 15px; 1030 | background-color: transparent; 1031 | border: none; 1032 | -webkit-border-radius: 0; 1033 | -moz-border-radius: 0; 1034 | border-radius: 0; 1035 | -webkit-box-shadow: none; 1036 | -moz-box-shadow: none; 1037 | box-shadow: none; 1038 | } 1039 | .nav-collapse .open > .dropdown-menu { 1040 | display: block; 1041 | } 1042 | .nav-collapse .dropdown-menu:before, 1043 | .nav-collapse .dropdown-menu:after { 1044 | display: none; 1045 | } 1046 | .nav-collapse .dropdown-menu .divider { 1047 | display: none; 1048 | } 1049 | .nav-collapse .nav > li > .dropdown-menu:before, 1050 | .nav-collapse .nav > li > .dropdown-menu:after { 1051 | display: none; 1052 | } 1053 | .nav-collapse .navbar-form, 1054 | .nav-collapse .navbar-search { 1055 | float: none; 1056 | padding: 10px 15px; 1057 | margin: 10px 0; 1058 | border-top: 1px solid #f2f2f2; 1059 | border-bottom: 1px solid #f2f2f2; 1060 | -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1061 | -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1062 | box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); 1063 | } 1064 | .navbar-inverse .nav-collapse .navbar-form, 1065 | .navbar-inverse .nav-collapse .navbar-search { 1066 | border-top-color: #111111; 1067 | border-bottom-color: #111111; 1068 | } 1069 | .navbar .nav-collapse .nav.pull-right { 1070 | float: none; 1071 | margin-left: 0; 1072 | } 1073 | .nav-collapse, 1074 | .nav-collapse.collapse { 1075 | height: 0; 1076 | overflow: hidden; 1077 | } 1078 | .navbar .btn-navbar { 1079 | display: block; 1080 | } 1081 | .navbar-static .navbar-inner { 1082 | padding-right: 10px; 1083 | padding-left: 10px; 1084 | } 1085 | } 1086 | 1087 | @media (min-width: 980px) { 1088 | .nav-collapse.collapse { 1089 | height: auto !important; 1090 | overflow: visible !important; 1091 | } 1092 | } 1093 | -------------------------------------------------------------------------------- /src/main/webapp/resources/bootstrap/css/bootstrap-responsive.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Responsive v2.2.2 3 | * 4 | * Copyright 2012 Twitter, Inc 5 | * Licensed under the Apache License v2.0 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Designed and built with all the love in the world @twitter by @mdo and @fat. 9 | */@-ms-viewport{width:device-width}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} 10 | -------------------------------------------------------------------------------- /src/main/webapp/resources/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirankasa/springrest-angularjs/c95ef1cfaed1993e051e7496d40e2951cd202dac/src/main/webapp/resources/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /src/main/webapp/resources/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kirankasa/springrest-angularjs/c95ef1cfaed1993e051e7496d40e2951cd202dac/src/main/webapp/resources/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /src/main/webapp/resources/bootstrap/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap.js by @fat & @mdo 3 | * Copyright 2012 Twitter, Inc. 4 | * http://www.apache.org/licenses/LICENSE-2.0.txt 5 | */ 6 | !function($){"use strict";$(function(){$.support.transition=function(){var transitionEnd=function(){var name,el=document.createElement("bootstrap"),transEndEventNames={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(name in transEndEventNames)if(void 0!==el.style[name])return transEndEventNames[name]}();return transitionEnd&&{end:transitionEnd}}()})}(window.jQuery),!function($){"use strict";var dismiss='[data-dismiss="alert"]',Alert=function(el){$(el).on("click",dismiss,this.close)};Alert.prototype.close=function(e){function removeElement(){$parent.trigger("closed").remove()}var $parent,$this=$(this),selector=$this.attr("data-target");selector||(selector=$this.attr("href"),selector=selector&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),e&&e.preventDefault(),$parent.length||($parent=$this.hasClass("alert")?$this:$this.parent()),$parent.trigger(e=$.Event("close")),e.isDefaultPrevented()||($parent.removeClass("in"),$.support.transition&&$parent.hasClass("fade")?$parent.on($.support.transition.end,removeElement):removeElement())};var old=$.fn.alert;$.fn.alert=function(option){return this.each(function(){var $this=$(this),data=$this.data("alert");data||$this.data("alert",data=new Alert(this)),"string"==typeof option&&data[option].call($this)})},$.fn.alert.Constructor=Alert,$.fn.alert.noConflict=function(){return $.fn.alert=old,this},$(document).on("click.alert.data-api",dismiss,Alert.prototype.close)}(window.jQuery),!function($){"use strict";var Button=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.button.defaults,options)};Button.prototype.setState=function(state){var d="disabled",$el=this.$element,data=$el.data(),val=$el.is("input")?"val":"html";state+="Text",data.resetText||$el.data("resetText",$el[val]()),$el[val](data[state]||this.options[state]),setTimeout(function(){"loadingText"==state?$el.addClass(d).attr(d,d):$el.removeClass(d).removeAttr(d)},0)},Button.prototype.toggle=function(){var $parent=this.$element.closest('[data-toggle="buttons-radio"]');$parent&&$parent.find(".active").removeClass("active"),this.$element.toggleClass("active")};var old=$.fn.button;$.fn.button=function(option){return this.each(function(){var $this=$(this),data=$this.data("button"),options="object"==typeof option&&option;data||$this.data("button",data=new Button(this,options)),"toggle"==option?data.toggle():option&&data.setState(option)})},$.fn.button.defaults={loadingText:"loading..."},$.fn.button.Constructor=Button,$.fn.button.noConflict=function(){return $.fn.button=old,this},$(document).on("click.button.data-api","[data-toggle^=button]",function(e){var $btn=$(e.target);$btn.hasClass("btn")||($btn=$btn.closest(".btn")),$btn.button("toggle")})}(window.jQuery),!function($){"use strict";var Carousel=function(element,options){this.$element=$(element),this.options=options,"hover"==this.options.pause&&this.$element.on("mouseenter",$.proxy(this.pause,this)).on("mouseleave",$.proxy(this.cycle,this))};Carousel.prototype={cycle:function(e){return e||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval($.proxy(this.next,this),this.options.interval)),this},to:function(pos){var $active=this.$element.find(".item.active"),children=$active.parent().children(),activePos=children.index($active),that=this;if(!(pos>children.length-1||0>pos))return this.sliding?this.$element.one("slid",function(){that.to(pos)}):activePos==pos?this.pause().cycle():this.slide(pos>activePos?"next":"prev",$(children[pos]))},pause:function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&$.support.transition.end&&(this.$element.trigger($.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){return this.sliding?void 0:this.slide("next")},prev:function(){return this.sliding?void 0:this.slide("prev")},slide:function(type,next){var e,$active=this.$element.find(".item.active"),$next=next||$active[type](),isCycling=this.interval,direction="next"==type?"left":"right",fallback="next"==type?"first":"last",that=this;if(this.sliding=!0,isCycling&&this.pause(),$next=$next.length?$next:this.$element.find(".item")[fallback](),e=$.Event("slide",{relatedTarget:$next[0]}),!$next.hasClass("active")){if($.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(e),e.isDefaultPrevented())return;$next.addClass(type),$next[0].offsetWidth,$active.addClass(direction),$next.addClass(direction),this.$element.one($.support.transition.end,function(){$next.removeClass([type,direction].join(" ")).addClass("active"),$active.removeClass(["active",direction].join(" ")),that.sliding=!1,setTimeout(function(){that.$element.trigger("slid")},0)})}else{if(this.$element.trigger(e),e.isDefaultPrevented())return;$active.removeClass("active"),$next.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return isCycling&&this.cycle(),this}}};var old=$.fn.carousel;$.fn.carousel=function(option){return this.each(function(){var $this=$(this),data=$this.data("carousel"),options=$.extend({},$.fn.carousel.defaults,"object"==typeof option&&option),action="string"==typeof option?option:options.slide;data||$this.data("carousel",data=new Carousel(this,options)),"number"==typeof option?data.to(option):action?data[action]():options.interval&&data.cycle()})},$.fn.carousel.defaults={interval:5e3,pause:"hover"},$.fn.carousel.Constructor=Carousel,$.fn.carousel.noConflict=function(){return $.fn.carousel=old,this},$(document).on("click.carousel.data-api","[data-slide]",function(e){var href,$this=$(this),$target=$($this.attr("data-target")||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,"")),options=$.extend({},$target.data(),$this.data());$target.carousel(options),e.preventDefault()})}(window.jQuery),!function($){"use strict";var Collapse=function(element,options){this.$element=$(element),this.options=$.extend({},$.fn.collapse.defaults,options),this.options.parent&&(this.$parent=$(this.options.parent)),this.options.toggle&&this.toggle()};Collapse.prototype={constructor:Collapse,dimension:function(){var hasWidth=this.$element.hasClass("width");return hasWidth?"width":"height"},show:function(){var dimension,scroll,actives,hasData;if(!this.transitioning){if(dimension=this.dimension(),scroll=$.camelCase(["scroll",dimension].join("-")),actives=this.$parent&&this.$parent.find("> .accordion-group > .in"),actives&&actives.length){if(hasData=actives.data("collapse"),hasData&&hasData.transitioning)return;actives.collapse("hide"),hasData||actives.data("collapse",null)}this.$element[dimension](0),this.transition("addClass",$.Event("show"),"shown"),$.support.transition&&this.$element[dimension](this.$element[0][scroll])}},hide:function(){var dimension;this.transitioning||(dimension=this.dimension(),this.reset(this.$element[dimension]()),this.transition("removeClass",$.Event("hide"),"hidden"),this.$element[dimension](0))},reset:function(size){var dimension=this.dimension();return this.$element.removeClass("collapse")[dimension](size||"auto")[0].offsetWidth,this.$element[null!==size?"addClass":"removeClass"]("collapse"),this},transition:function(method,startEvent,completeEvent){var that=this,complete=function(){"show"==startEvent.type&&that.reset(),that.transitioning=0,that.$element.trigger(completeEvent)};this.$element.trigger(startEvent),startEvent.isDefaultPrevented()||(this.transitioning=1,this.$element[method]("in"),$.support.transition&&this.$element.hasClass("collapse")?this.$element.one($.support.transition.end,complete):complete())},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}};var old=$.fn.collapse;$.fn.collapse=function(option){return this.each(function(){var $this=$(this),data=$this.data("collapse"),options="object"==typeof option&&option;data||$this.data("collapse",data=new Collapse(this,options)),"string"==typeof option&&data[option]()})},$.fn.collapse.defaults={toggle:!0},$.fn.collapse.Constructor=Collapse,$.fn.collapse.noConflict=function(){return $.fn.collapse=old,this},$(document).on("click.collapse.data-api","[data-toggle=collapse]",function(e){var href,$this=$(this),target=$this.attr("data-target")||e.preventDefault()||(href=$this.attr("href"))&&href.replace(/.*(?=#[^\s]+$)/,""),option=$(target).data("collapse")?"toggle":$this.data();$this[$(target).hasClass("in")?"addClass":"removeClass"]("collapsed"),$(target).collapse(option)})}(window.jQuery),!function($){"use strict";function clearMenus(){$(toggle).each(function(){getParent($(this)).removeClass("open")})}function getParent($this){var $parent,selector=$this.attr("data-target");return selector||(selector=$this.attr("href"),selector=selector&&/#/.test(selector)&&selector.replace(/.*(?=#[^\s]*$)/,"")),$parent=$(selector),$parent.length||($parent=$this.parent()),$parent}var toggle="[data-toggle=dropdown]",Dropdown=function(element){var $el=$(element).on("click.dropdown.data-api",this.toggle);$("html").on("click.dropdown.data-api",function(){$el.parent().removeClass("open")})};Dropdown.prototype={constructor:Dropdown,toggle:function(){var $parent,isActive,$this=$(this);if(!$this.is(".disabled, :disabled"))return $parent=getParent($this),isActive=$parent.hasClass("open"),clearMenus(),isActive||$parent.toggleClass("open"),$this.focus(),!1},keydown:function(e){var $this,$items,$parent,isActive,index;if(/(38|40|27)/.test(e.keyCode)&&($this=$(this),e.preventDefault(),e.stopPropagation(),!$this.is(".disabled, :disabled"))){if($parent=getParent($this),isActive=$parent.hasClass("open"),!isActive||isActive&&27==e.keyCode)return $this.click();$items=$("[role=menu] li:not(.divider):visible a",$parent),$items.length&&(index=$items.index($items.filter(":focus")),38==e.keyCode&&index>0&&index--,40==e.keyCode&&$items.length-1>index&&index++,~index||(index=0),$items.eq(index).focus())}}};var old=$.fn.dropdown;$.fn.dropdown=function(option){return this.each(function(){var $this=$(this),data=$this.data("dropdown");data||$this.data("dropdown",data=new Dropdown(this)),"string"==typeof option&&data[option].call($this)})},$.fn.dropdown.Constructor=Dropdown,$.fn.dropdown.noConflict=function(){return $.fn.dropdown=old,this},$(document).on("click.dropdown.data-api touchstart.dropdown.data-api",clearMenus).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("touchstart.dropdown.data-api",".dropdown-menu",function(e){e.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",toggle,Dropdown.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",toggle+", [role=menu]",Dropdown.prototype.keydown)}(window.jQuery),!function($){"use strict";var Modal=function(element,options){this.options=options,this.$element=$(element).delegate('[data-dismiss="modal"]',"click.dismiss.modal",$.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};Modal.prototype={constructor:Modal,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var that=this,e=$.Event("show");this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.escape(),this.backdrop(function(){var transition=$.support.transition&&that.$element.hasClass("fade");that.$element.parent().length||that.$element.appendTo(document.body),that.$element.show(),transition&&that.$element[0].offsetWidth,that.$element.addClass("in").attr("aria-hidden",!1),that.enforceFocus(),transition?that.$element.one($.support.transition.end,function(){that.$element.focus().trigger("shown")}):that.$element.focus().trigger("shown")}))},hide:function(e){e&&e.preventDefault(),e=$.Event("hide"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),$(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),$.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal())},enforceFocus:function(){var that=this;$(document).on("focusin.modal",function(e){that.$element[0]===e.target||that.$element.has(e.target).length||that.$element.focus()})},escape:function(){var that=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(e){27==e.which&&that.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var that=this,timeout=setTimeout(function(){that.$element.off($.support.transition.end),that.hideModal()},500);this.$element.one($.support.transition.end,function(){clearTimeout(timeout),that.hideModal()})},hideModal:function(){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(callback){var animate=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var doAnimate=$.support.transition&&animate;this.$backdrop=$('