Skip to content
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
e0dd010
Improve structure of direct.ear & remove the jars need to be rebuilt …
hohosky Oct 20, 2014
4ff3477
Revert the incorrect override
hohosky Oct 20, 2014
e8f7526
Search user indicator
hohosky Oct 20, 2014
164b1b0
Merge branch 'dev' of https://github.com/cloudspokes/direct-app into …
hohosky Oct 20, 2014
c970ab1
Merge pull request #7 from cloudspokes/technology-2014-10-23
mashannon168 Oct 20, 2014
6b2812f
S-266237 and S-266238 Term link
mashannon168 Oct 20, 2014
449468f
S-266237 and S-266238, term link.
mashannon168 Oct 20, 2014
8333418
Merge pull request #9 from cloudspokes/technology-2014-10-23
mashannon168 Oct 21, 2014
57e3133
I-134652
mashannon168 Oct 22, 2014
7e099e1
Merge branch 'dev' of https://github.com/cloudspokes/direct-app into dev
mashannon168 Oct 22, 2014
a1ff5d4
I-134628 (1)
mashannon168 Oct 23, 2014
8b022ce
S-265837
mashannon168 Oct 23, 2014
88590c3
S-253152
mashannon168 Oct 23, 2014
91249cb
Remove invalid chars in documentation to pass the JDK7 encoding checking
hohosky Oct 23, 2014
c2c0823
Change async to true for search user - async false prevents loading a…
hohosky Oct 23, 2014
d245071
Performance copilot data in project
hohosky Oct 25, 2014
d72b9c2
Merge pull request #33 from cloudspokes/performance_copilot
mashannon168 Oct 27, 2014
e950487
Update build-components.xml
hohosky Oct 28, 2014
8cfc3cf
Add setup instruction to README.md
hohosky Oct 28, 2014
a648370
Add Marathon payments in direct
hohosky Oct 28, 2014
3d85ebf
S-267647
mashannon168 Oct 29, 2014
009d4d9
Merge branch 'dev' of https://github.com/cloudspokes/direct-app into dev
mashannon168 Oct 29, 2014
5b706c4
I-136803
mashannon168 Oct 30, 2014
dd0721e
Update README.md
mashannon168 Oct 30, 2014
cbec7c8
Update README.md
mashannon168 Oct 30, 2014
b16848d
I-136803
mashannon168 Oct 30, 2014
7bf708c
Merge branch 'dev' of https://github.com/cloudspokes/direct-app into dev
mashannon168 Oct 30, 2014
3159cf1
Config fix.
mashannon168 Nov 6, 2014
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
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
direct-app
==========

Setup on VM:
* Once you get your VM, login into the VM with your private key and account 'direct'
* Back up token.properties and topcoder_global.properties in /home/direct/direct somewhere
* Delete the whole directory /home/direct/direct
* Git Clone the direct-app repo into folder /home/direct/direct.
* Copy the back up *.properties files back to /home/direct/direct

Setup on Local env - Refer to http://apps.topcoder.com/wiki/display/docs/TC+Direct+Setup+Guide
* Instead of using SVN, you will use the codes from this git repo

VM Info:
* http://apps.topcoder.com/wiki/display/projects/Direct+VM
* http://apps.topcoder.com/wiki/display/docs/VM+Image+2.5

Build/Compile
* run 'ant'

Deploy:
* simply run 'ant deploy' to build all the components and the direct and deploy the direct to jboss

12 changes: 7 additions & 5 deletions build-components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,28 @@

<property name="buildroot" value="../../build"/>

<property name="builddir" value="${buildroot}/${distfilename}"/>

<property name="builddir" value="${buildroot}/${distfilename}"/>

<property name="component.jar" value="${buildroot}/${distfilename}.jar"/>

<target name="check_meata_file">
<target name="check_metafile">
<available file="${configdir}/META-INF/" property="meta_config_exists" type="dir"/>
</target>

<target name="dist_direct_meata_file" depends="clean, compile" if="meta_config_exists">
<target name="dist_direct_metafile" depends="clean, compile" if="meta_config_exists">
<jar jarfile="${buildroot}/${distfilename}.jar" basedir="${build_classdir}">
<metainf dir="${configdir}/META-INF/" includes="**"/>
</jar>
</target>

<target name="dist_direct_no_meata_file" depends="clean, compile" unless="meta_config_exists">
<target name="dist_direct_no_metafile" depends="clean, compile" unless="meta_config_exists">
<jar jarfile="${buildroot}/${distfilename}.jar" basedir="${build_classdir}">
</jar>
</target>

<target name="dist_direct" depends="check_meata_file, dist_direct_meata_file, dist_direct_no_meata_file">
<target name="dist_direct" depends="check_metafile, dist_direct_metafile, dist_direct_no_metafile">
<if>
<equals arg1="${needTokenize}" arg2="true"/>
<then>
Expand All @@ -34,4 +36,4 @@

</target>

</project>
</project>
3 changes: 3 additions & 0 deletions build-dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@

<property name="client_invoice_entities_dao.jar" value="${tcs_libdir}/client_invoice_entities_dao.jar"/>


<!-- EJB services -->

<property name="client_project_entities_dao.jar" value="${direct_service_libdir}/client_project_entities_dao.jar"/>

<property name="user_service.jar" value="${direct_service_libdir}/user_service.jar"/>
Expand Down
38 changes: 2 additions & 36 deletions build-master-targets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -543,45 +543,11 @@
</target>

<target name="update-single-revision-number-for-css" description="update revision number for each CSS file">
<pathconvert property="pathInPage" pathsep="/" dirsep="/">
<path location="${file}"/>
<map from="${basedir}/src/web" to="" />
</pathconvert>

<svnex>
<status path="${file}" lastChangedRevisionProperty="svn.info.lastRev" />
</svnex>

<basename property="filename" file="${pathInPage}" suffix=".css"/>

<replaceregexp byline="true">
<regexp pattern='([href|src])="(.*${filename})(\.svn\d+)?\.css(\?v=\d+)?"'/>
<substitution expression='\1="\2\.svn${svn.info.lastRev}\.css"'/>
<fileset dir="${build_distdir}/direct.war">
<include name="**/*.jsp"/>
</fileset>
</replaceregexp>
<update-single-revision-number file="${file}" type="css"/>
</target>

<target name="update-single-revision-number-for-js" description="update revision number for each javascript file">
<pathconvert property="pathInPage" pathsep="/" dirsep="/">
<path location="${file}"/>
<map from="${basedir}/src/web" to="" />
</pathconvert>

<svnex>
<status path="${file}" lastChangedRevisionProperty="svn.info.lastRev" />
</svnex>

<basename property="filename" file="${pathInPage}" suffix=".js"/>

<replaceregexp byline="true">
<regexp pattern='([href|src])="(.*${filename})(\.svn\d+)?\.js(\?v=\d+)?"'/>
<substitution expression='\1="\2\.svn${svn.info.lastRev}\.js"'/>
<fileset dir="${build_distdir}/direct.war">
<include name="**/*.jsp"/>
</fileset>
</replaceregexp>
<update-single-revision-number file="${file}" type="js"/>
</target>

<target name="update-revision-numbers" description="update revision number for static files">
Expand Down
56 changes: 56 additions & 0 deletions build-master-tasks.xml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,60 @@
}
]]>
</scriptdef>

<macrodef name="update-single-revision-number" description="Update revision number for a file.">
<attribute name="file" />
<attribute name="type" />

<sequential>
<taskdef name="groovy"
classname="org.codehaus.groovy.ant.Groovy"
classpathref="script.path"/>

<pathconvert property="pathInPage" pathsep="/" dirsep="/">
<path location="@{file}"/>
<map from="${basedir}/src/web" to="" />
</pathconvert>

<exec executable="git" outputproperty="git.log.lastMod">
<arg value="log"/>
<arg value="-1"/>
<arg value="--pretty=format:%ct"/>
<arg value="@{file}"/>
</exec>

<groovy>
<![CDATA[
import java.util.*

def calendar = Calendar.getInstance(TimeZone.getTimeZone("UTC"))
calendar.setTimeInMillis(Long.parseLong(properties["git.log.lastMod"]) * 1000)

properties["lastModYear"] = "" + calendar.get(Calendar.YEAR)
def month = calendar.get(Calendar.MONTH) + 1
if (month < 10) {
properties["lastModMonth"] = "0" + month
} else {
properties["lastModMonth"] = "" + month
}
def day = calendar.get(Calendar.DAY_OF_MONTH)
if (day < 10) {
properties["lastModDate"] = "0" + day
} else {
properties["lastModDate"] = "" + day
}
]]>
</groovy>

<basename property="filename" file="${pathInPage}" suffix=".@{type}"/>

<replaceregexp byline="true">
<regexp pattern='([href|src])="(.*${filename})(\.git\d+)?\.@{type}(\?v=\d+)?"'/>
<substitution expression='\1="\2\.git${lastModYear}${lastModMonth}${lastModDate}\.@{type}"'/>
<fileset dir="${build_distdir}/direct.war">
<include name="**/*.jsp"/>
</fileset>
</replaceregexp>
</sequential>
</macrodef>
</project>
11 changes: 5 additions & 6 deletions build-services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@

<property name="component.jar" value="${buildroot}/${distfilename}.jar"/>

<target name="check_meata_file">
<target name="check_metafile">
<available file="${configdir}/META-INF/" property="meta_config_exists" type="dir"/>
</target>

<target name="dist_direct_meata_file" depends="clean, compile" if="meta_config_exists">
<target name="dist_direct_metafile" depends="clean, compile" if="meta_config_exists">
<jar jarfile="${buildroot}/${distfilename}.jar" basedir="${build_classdir}">
<metainf dir="${configdir}/META-INF/" includes="**"/>
</jar>
</target>

<target name="dist_direct_no_meata_file" depends="clean, compile" unless="meta_config_exists">
<target name="dist_direct_no_metafile" depends="clean, compile" unless="meta_config_exists">
<jar jarfile="${buildroot}/${distfilename}.jar" basedir="${build_classdir}">
</jar>
</target>

<target name="dist_direct" depends="check_meata_file, dist_direct_meata_file, dist_direct_no_meata_file">
<target name="dist_direct" depends="check_metafile, dist_direct_metafile, dist_direct_no_metafile">
<if>
<equals arg1="${needTokenize}" arg2="true"/>
<then>
Expand All @@ -31,7 +31,6 @@
</if>

<copy file="${buildroot}/${distfilename}.jar" todir="${direct_service_libdir}/"/>

</target>

</project>
</project>
45 changes: 23 additions & 22 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,30 +314,31 @@
<copy file="${yuicompressor.jar}" todir="${ear_shared_libdir}" overwrite="true"/>

<!-- EJB components -->
<copy file="${catalog_services_id_generator.jar}" todir="${build_distdir}" overwrite="true"/> <copy file="${catalog_services.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${client_project_entities_dao.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${cloud_vm_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${user_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${project_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${game_plan_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${contest_eligibility_persistence.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${contest_eligibility_validation.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${project_services.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${specification_review_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${specification_review_comment_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${contest_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${permission_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${user_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${project_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${admin_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${pipeline_service.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${pipeline_service_facade.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${project.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${user.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${ldap_sdk_interface.jar}" todir="${build_distdir}" overwrite="true"/>
<copy file="${catalog_services_id_generator.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${catalog_services.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${client_project_entities_dao.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${cloud_vm_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${user_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${project_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${game_plan_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${contest_eligibility_persistence.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${contest_eligibility_validation.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${project_services.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${specification_review_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${specification_review_comment_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${contest_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${permission_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${user_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${project_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${admin_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${pipeline_service.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${pipeline_service_facade.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${project.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${user.jar}" todir="${build_distdir}/ejb" overwrite="true"/>
<copy file="${ldap_sdk_interface.jar}" todir="${build_distdir}/ejb" overwrite="true"/>

<!-- Copy configuration files -->
<copy todir="${build_distdir}">
<copy todir="${build_distdir}/conf">
<fileset dir="${tokenized_conf}">
<include name="tc_login_bean.properties" />
<include name="email_templates/**/*.txt" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* <p>
* The UploadPersistence interface defines the methods for persisting and retrieving the object model in this
* component. This interface handles the persistence of the upload related classes that make up the object model �C
* component. This interface handles the persistence of the upload related classes that make up the object model
* Uploads, Submissions, UploadTypes, UploadStatuses, SubmissionStatuses. This interface is not responsible for
* searching the persistence for the various entities. This is instead handled by an UploadManager implementation.
* </p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* operations of "start", "end", and "cancel". This is provided as a utility to the user when they need to identify
* the phase operation when registering a phase handler with a manager. This is used when creating
* HandlerRegistryInfo instances for handler registrations (used as keys to id handlers), which need to know what
* operation the handler will handle (as well as which phase status it will deal with which is covered by
* operation the handler will handle (as well as which phase status it will deal with - which is covered by
* PhaseStatusEnum).</p>
*
* <p>PhaseOperation is an Enum and thus poses no thread-safety issues.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,46 +51,6 @@
* If the user passes "auto" as the command line argument, the utility automatically executes all generated
* SQL queries.
* </p>
* <p>
* Accepted command line arguments:
* <ul>
* <li>"-inamespace" flag followed by XmlPhaseTemplatePersistence configuration namespace. Only this argument
* is required.</li>
* <li>"-onamespace" flag followed by DBPhaseTemplatePersistence configuration namespace.</li>
* <li>"-ifile" flag followed by name of additional config file for xml persistence namespace that the
* ConfigManager to load.</li>
* <li>"-oifile" flag followed by name of additional config file for db persistence namespace that the
* ConfigManager to load.</li>
* <li>"-auto" flag that indicates whether to executes the generated SQL queries automatically.</li>
* </ul>
* </p>
* The method
* utilizes Command Line Utility component to facilitate parameters parsing and handling.
* <p>
* <p>
* Sample usage of this command line tools:<br/>
* The following command line can be used to output SQL queries those are intended for fulfilling an empty
* database:<br/>
* java ConverterUtility.class –inamespace xml_phase_template_namespace<br/>
* <br/>
* The following command line can be used to output SQL queries those are intended for adding templates to
* non-empty database:<br/>
* java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace
* db_phase_template_namespace <br/>
* <br/>
* The following command line can be used to fulfill a database (queries are executed automatically):<br/>
* java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace
* db_phase_template_namespace –auto <br/>
* <br/>
* If users want to specify the config files in the command line instead of ConfigManager.properties, they can
* use the following command line(suppose the xml_phase_template_namespace is in file "xml_config.xml", and
* db_phase_template_namespace is in "db_config.xml"):<br/>
* java ConverterUtility.class –inamespace xml_phase_template_namespace –onamespace
* db_phase_template_namespace –ifile xml_config.xml –ofile db_config.xml –auto
* </p>
* <strong>Thread-safety:</strong> This class is not thread safe. But it is not required, because
* only one instance of it is used in converter application.
* </p>
*
* @author saarixx, TCSDEVELOPER
* @version 1.1
Expand Down Expand Up @@ -145,7 +105,7 @@ public class ConverterUtility {
* </p>
*/
private static final String HELP_MSG = "Sample usage: java jarname"
+ " Cinamespace Xml_Persistence_NamSpace Conamespace DB_Persistence_Namespace -auto"
+ " Cinamespace Xml_Persistence_NamSpace Conamespace DB_Persistence_Namespace -auto"
+ "(-onamespace and -auto is optional)";

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* <p>
* The ResourcePersistence interface defines the methods for persisting and
* retrieving the object model in this component. This interface handles the
* persistence of the four classes that make up the object model �C Resources,
* persistence of the four classes that make up the object model Resources,
* ResourceRoles, Notifications, and NotificationTypes. This interface is not
* responsible for searching the persistence for the various entities. This is
* instead handled by a ResourceManager implementation.
Expand Down
Loading