Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HEBAKUSA - 13513015 - Aufar Gilbran #7

Open
wants to merge 61 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
203b3e8
Create project structure
tisorlawan Nov 11, 2015
59fd095
Create Service for get all questions
tisorlawan Nov 12, 2015
8acc0cd
create SOap web service
tisorlawan Nov 15, 2015
07f375f
create frontend log in
gbusiri Nov 15, 2015
e905055
Create authentication service
aufarg Nov 15, 2015
dbeb62a
Refactor services
tisorlawan Nov 15, 2015
707aa4d
create frontend create question
gbusiri Nov 15, 2015
c6e9128
Fix project structure not working
aufarg Nov 15, 2015
ab1cdfb
Refactor code
gbusiri Nov 15, 2015
c16453b
Add user registration
aufarg Nov 15, 2015
140ebc0
Fix stackexchangeservice
aufarg Nov 15, 2015
5f9a311
Again, fix project structure
aufarg Nov 15, 2015
d140f92
Add gitkeep to WEB-INF in IdentityService
aufarg Nov 15, 2015
020ab98
Fix Identity Service
tisorlawan Nov 15, 2015
a72383c
Create token data model
aufarg Nov 15, 2015
6aa83ba
Change login response to access token
aufarg Nov 15, 2015
1ab770c
Multiple GlassFish server, one for each project
aufarg Nov 15, 2015
9f7267c
Create Question and Answer models in Client
tisorlawan Nov 15, 2015
1e4b1ba
Add token as parameter value
aufarg Nov 16, 2015
17ce69f
Use AccessToken to call services
aufarg Nov 16, 2015
94b444e
Add stub to webservice return value
aufarg Nov 16, 2015
a62b5a0
Generate WSDL Interface
aufarg Nov 16, 2015
6b26200
Fix IdentityService Project WEB-INF folder
tisorlawan Nov 16, 2015
c8145f4
Implement token in client
aufarg Nov 16, 2015
1a5b988
Add username to login response
aufarg Nov 16, 2015
d7e8360
Change username to email instead of User's name
aufarg Nov 16, 2015
50b263a
front-end layout with jsp
gbusiri Nov 17, 2015
7929eba
front-end detail answer with JSP
gbusiri Nov 17, 2015
a60b103
front-end form answer and card question with JSP
gbusiri Nov 17, 2015
19db277
front-end detail question with JSP
gbusiri Nov 17, 2015
0d778d8
front-end form, form-edit and search with JSP:
gbusiri Nov 17, 2015
e0d9a92
Fix model
aufarg Nov 17, 2015
e6cb186
add frontend to project and set token to email
aufarg Nov 17, 2015
5ff2de7
Fix WSDL interface port
aufarg Nov 17, 2015
2da4856
Berusaha ngubah register.html tapi gagal
aufarg Nov 17, 2015
4006bff
Fix XML Tags and Annotation in Identity Service
tisorlawan Nov 17, 2015
609c06b
Create List of Questions with JSTL
tisorlawan Nov 17, 2015
e4e9b21
List dan Detail Page Fix
tisorlawan Nov 17, 2015
ecf0bd2
Benerin Token, Login di client
tisorlawan Nov 17, 2015
4581605
Implement Cookies for token in Client Side
tisorlawan Nov 17, 2015
2d26a62
Ganti parameter Web Service dan Form
tisorlawan Nov 17, 2015
38b464b
Fix Votes pada Answer dan Question
tisorlawan Nov 17, 2015
5d37cba
Benerin Front End, buat Kelas unutk Authentikasi Request
tisorlawan Nov 17, 2015
e546cf0
Add logout capability
tisorlawan Nov 18, 2015
c238279
Fix voting using AJAX
tisorlawan Nov 18, 2015
4de1ed7
Menampilkan "Edit","Delete" hanya untuk user yang membuat pertanyaan …
tisorlawan Nov 18, 2015
2d802d9
Add error message if fail when login or register
tisorlawan Nov 18, 2015
a254902
Add error message if fail when login or register 2
tisorlawan Nov 18, 2015
c392bf5
Add authentication handle in identity service
tisorlawan Nov 25, 2015
eefeef5
Fix cokkies deleted after log out
tisorlawan Nov 25, 2015
c716137
Add GetQuestionWithoutValidation() for detail
tisorlawan Nov 25, 2015
06c99be
Vote Up with authentication Success
gbusiri Nov 25, 2015
2f65209
Vote answer and create answer with authentication Success
gbusiri Nov 25, 2015
2267203
Vote Question only one allowed
gbusiri Nov 25, 2015
e2496aa
Fix vote answers
gbusiri Nov 25, 2015
d69c3e4
Fix answer vote, and Add error message
gbusiri Nov 26, 2015
a09ea16
Add Security for Storing Password
tisorlawan Nov 26, 2015
d803c60
Edit Readme
tisorlawan Nov 27, 2015
eb3b8b8
Add gitkeep
tisorlawan Nov 27, 2015
7b62cdc
Token should have user id in database
aufarg Dec 5, 2015
f79980f
Fix bug: resource owner using depends on user id
aufarg Dec 5, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/StackExchange/nbproject/private/
/StackExchangeService/nbproject/private/
/IdentityService/nbproject/private/
/Client/nbproject/private/
/StackExchangeService/build/
/Client/build/
/Client/dist/
/StackExchangeService/dist/
/IdentityService/IdentityService/build/
/IdentityService/IdentityService/nbproject/private/
/IdentityService/build/
*.class
/IdentityService/dist/
11 changes: 11 additions & 0 deletions .gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/Client/build.xml
/Client/catalog.xml
/Client/nbproject/build-impl.xml
/Client/nbproject/genfiles.properties
/Client/nbproject/jax-ws.xml
/Client/nbproject/jaxws-build.xml
/Client/nbproject/project.xml
/Client/src/conf/xml-resources/
/Client/web/WEB-INF/wsdl/localhost_8081/


71 changes: 71 additions & 0 deletions Client/build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- You may freely edit this file. See commented blocks below for -->
<!-- some examples of how to customize the build. -->
<!-- (If you delete it and reopen the project it will be recreated.) -->
<!-- By default, only the Clean and Build commands use this build script. -->
<!-- Commands such as Run, Debug, and Test only use this build script if -->
<!-- the Compile on Save feature is turned off for the project. -->
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
<!-- in the project's Project Properties dialog box.-->
<project name="Client" default="default" basedir=".">
<description>Builds, tests, and runs the project Client.</description>
<import file="nbproject/build-impl.xml"/>
<!--

There exist several targets which are by default empty and which can be
used for execution of your tasks. These targets are usually executed
before and after some main targets. They are:

-pre-init: called before initialization of project properties
-post-init: called after initialization of project properties
-pre-compile: called before javac compilation
-post-compile: called after javac compilation
-pre-compile-single: called before javac compilation of single file
-post-compile-single: called after javac compilation of single file
-pre-compile-test: called before javac compilation of JUnit tests
-post-compile-test: called after javac compilation of JUnit tests
-pre-compile-test-single: called before javac compilation of single JUnit test
-post-compile-test-single: called after javac compilation of single JUunit test
-pre-dist: called before archive building
-post-dist: called after archive building
-post-clean: called after cleaning build products
-pre-run-deploy: called before deploying
-post-run-deploy: called after deploying

Example of pluging an obfuscator after the compilation could look like

<target name="-post-compile">
<obfuscate>
<fileset dir="${build.classes.dir}"/>
</obfuscate>
</target>

For list of available properties check the imported
nbproject/build-impl.xml file.


Other way how to customize the build is by overriding existing main targets.
The target of interest are:

init-macrodef-javac: defines macro for javac compilation
init-macrodef-junit: defines macro for junit execution
init-macrodef-debug: defines macro for class debugging
do-dist: archive building
run: execution of project
javadoc-build: javadoc generation

Example of overriding the target for project execution could look like

<target name="run" depends="<PROJNAME>-impl.jar">
<exec dir="bin" executable="launcher.exe">
<arg file="${dist.jar}"/>
</exec>
</target>

Notice that overridden target depends on jar target and not only on
compile target as regular run target does. Again, for list of available
properties which you can use check the target you are overriding in
nbproject/build-impl.xml file.

-->
</project>
7 changes: 7 additions & 0 deletions Client/catalog.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog" prefer="system">
<system systemId="http://localhost:8082/StackExchangeService/StackExchangeService?wsdl" uri="src/conf/xml-resources/web-service-references/StackExchangeService/wsdl/localhost_8082/StackExchangeService/StackExchangeService.wsdl"/>
<system systemId="http://localhost:8082/StackExchangeService/StackExchangeService?xsd=1" uri="src/conf/xml-resources/web-service-references/StackExchangeService/wsdl/localhost_8082/StackExchangeService/StackExchangeService.xsd_1.xsd"/>
<system systemId="http://localhost:8081/StackExchangeService/StackExchangeService?wsdl" uri="src/conf/xml-resources/web-service-references/StackExchangeService/wsdl/localhost_8081/StackExchangeService/StackExchangeService.wsdl"/>
<system systemId="http://localhost:8081/StackExchangeService/StackExchangeService?xsd=1" uri="src/conf/xml-resources/web-service-references/StackExchangeService/wsdl/localhost_8081/StackExchangeService/StackExchangeService.xsd_1.xsd"/>
</catalog>
111 changes: 111 additions & 0 deletions Client/nbproject/ant-deploy.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<project default="-deploy-ant" basedir=".">
<target name="-init-cl-deployment-env" if="deploy.ant.enabled">
<property file="${deploy.ant.properties.file}" />
<available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
<available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
<available file="${deploy.ant.resource.dir}" property="has.setup"/>
<tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
</target>

<target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
<tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.sun.web}">
<replacetoken><![CDATA[<sun-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.sun.web}" validate="false">
</xmlproperty>
<delete file="${temp.sun.web}"/>
<condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
<isset property="sun-web-app.context-root"/>
</condition>
</target>
<target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
<tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
<copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
<!-- The doctype triggers resolution which can fail -->
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
<replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
</replace>
<replace file="${temp.gf.web}">
<replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
<replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
</replace>
<xmlproperty file="${temp.gf.web}" validate="false">
</xmlproperty>
<delete file="${temp.gf.web}"/>
<condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
<condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
<isset property="glassfish-web-app.context-root"/>
</condition>
</target>
<target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
<property name="deploy.context.root.argument" value=""/>
</target>
<target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
<tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
<mkdir dir="${gfv3.resources.dir}"/>
<mkdir dir="${gfv3.resources.dir}/META-INF"/>
<copy todir="${gfv3.resources.dir}/META-INF">
<fileset dir="${deploy.ant.resource.dir}"/>
</copy>
<jar destfile="${deploy.ant.archive}" update="true">
<fileset dir="${gfv3.resources.dir}"/>
</jar>
<delete dir="${gfv3.resources.dir}"/>
</target>
<target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
<antcall target="-deploy-without-pw"/>
<antcall target="-deploy-with-pw"/>
</target>

<target name="-deploy-without-pw" unless="gfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-deploy-with-pw" if="gfv3.password">
<echo message="Deploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
<antcall target="-undeploy-without-pw"/>
<antcall target="-undeploy-with-pw"/>
</target>

<target name="-undeploy-without-pw" unless="gfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
<target name="-undeploy-with-pw" if="gfv3.password">
<echo message="Undeploying ${deploy.ant.archive}"/>
<tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
<get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
dest="${gfv3.results.file}"/>
<delete file="${gfv3.results.file}"/>
</target>
</project>
Loading