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

FiDi-R - 13513006 - Rahman Adianto #12

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
6f4d9b6
Add Initial Project
rhmndnt Nov 10, 2015
cf0217c
html viewpost
Astahta Nov 10, 2015
ab75462
create home page structure
rhmndnt Nov 10, 2015
e07652f
Add Auth and Web Service project
rhmndnt Nov 12, 2015
11ef7f8
Add Auth project
rhmndnt Nov 12, 2015
bef6c81
Add Web Service project
rhmndnt Nov 12, 2015
80c5d08
add database mysql
Astahta Nov 12, 2015
d03a617
Add html register
dininta Nov 12, 2015
5e1acaa
Add Answer Web Service for debug
rhmndnt Nov 12, 2015
c68c75d
connect to database
dininta Nov 15, 2015
0f7b9f8
connect to database
dininta Nov 15, 2015
2ee8591
Add CSS
Astahta Nov 15, 2015
40e6dfc
Add register and askquestion css
dininta Nov 16, 2015
8e64ea1
Refactor Database connection
rhmndnt Nov 17, 2015
c9b9577
Refactor DB Connection
rhmndnt Nov 17, 2015
24d0791
Add CSS
Astahta Nov 17, 2015
639f635
add question services
Astahta Nov 17, 2015
cb4b628
Add viewpost css
dininta Nov 17, 2015
f6868ff
Add create answer service
rhmndnt Nov 17, 2015
1822b3a
add user services, and update question services
Astahta Nov 17, 2015
68a6322
update User services (create account)
rhmndnt Nov 17, 2015
5efac0a
add method count answer, get vote (QuestionWs)
Astahta Nov 17, 2015
63a82e7
change new Database
Astahta Nov 17, 2015
f5f3833
add method voteup, votedown, delete question, etc
Astahta Nov 17, 2015
0bee219
Rename
rhmndnt Nov 18, 2015
efdfed0
Remake client project
dininta Nov 18, 2015
f635b01
Delete Auth project for rebuild
rhmndnt Nov 18, 2015
12b2aea
Remake Auth
rhmndnt Nov 18, 2015
ee2ddd1
fix bugs (create question, delete question), add method isVoted (Answ…
Astahta Nov 18, 2015
65863bb
Add webservice client and servlet for index
dininta Nov 18, 2015
fcdc040
add webservice client
dininta Nov 18, 2015
a096ae0
new database sql
Astahta Nov 18, 2015
6d192c8
add indexServlet and viewpostServlet
dininta Nov 22, 2015
8f22ce7
Add Token Generator and Validator
rhmndnt Nov 22, 2015
b38b451
fix css
dininta Nov 22, 2015
0c3c08f
edit validateToken
rhmndnt Nov 22, 2015
14206b0
edit index for testing
rhmndnt Nov 22, 2015
0c2e0b3
modif getQuestion
Astahta Nov 22, 2015
1cee9ea
edit xml response
rhmndnt Nov 22, 2015
696c6f2
add servlet for home, addanswer, register, and viewpost
dininta Nov 22, 2015
4e7cf2c
Merge origin/master
rhmndnt Nov 22, 2015
a669ea4
Merge origin/master
rhmndnt Nov 22, 2015
4361ac3
fix home and index jsp
dininta Nov 23, 2015
9bd298f
resolve toXML() function
dininta Nov 23, 2015
04e5477
enable login
dininta Nov 24, 2015
d043239
implement soap consume rest service
Astahta Nov 24, 2015
9c7c31e
edit validateToken
rhmndnt Nov 24, 2015
9daa64e
add save username to token tabel
rhmndnt Nov 24, 2015
2f64ed9
implement deleteToken
rhmndnt Nov 24, 2015
eb82a0c
Authentication for AnswerWS and QuestionWS
Astahta Nov 24, 2015
c711854
fix vote question WS, vote answer WS, delete and edit question
Astahta Nov 25, 2015
c1608d9
enable askquestion and addanswer
dininta Nov 26, 2015
03faecd
Enable register and fix login-logout
dininta Nov 26, 2015
d9e0393
Enable edit question
dininta Nov 26, 2015
9a85ce3
Enable delete question
dininta Nov 26, 2015
7f05998
Enable vote
dininta Nov 26, 2015
1c0aebc
Fix login and logout and enable search
dininta Nov 26, 2015
f31baeb
Update Readme.md
dininta Nov 27, 2015
6762f1e
Update css
dininta Nov 27, 2015
7c3c6db
fix minor bug
dininta Nov 27, 2015
9293088
fix search function
dininta Nov 27, 2015
521587f
fix authentication token
Astahta Dec 1, 2015
1c41eae
handle expired token
dininta Dec 1, 2015
2536c3c
Add DB.java to gitignore
rhmndnt Mar 13, 2017
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/StackExchange/nbproject/private/
/StackExchangeAuth/nbproject/private/
/StackExchangeService/nbproject/private/
/StackExchange/build/
/StackExchangeService/build/
/StackExchangeAuth/build/
/StackExchangeService/dist/StackExchangeService/src/java/Config/DB.java
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Diharapkan dengan tugas ini anda dapat mengerti:

### Link Laporan

*Masukkan link laporan anda di sini*
https://www.dropbox.com/s/8ev1riwosukxoqd/LAPORAN%20TUGAS%20BESAR%202%20WBD.pdf?dl=0

### Arsitektur Umum Server

Expand Down
71 changes: 71 additions & 0 deletions StackExchangeAuth/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="StackExchangeAuth" default="default" basedir=".">
<description>Builds, tests, and runs the project StackExchangeAuth.</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>
111 changes: 111 additions & 0 deletions StackExchangeAuth/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