Skip to content

Commit

Permalink
Adding HTTP Utils, Apache Commons IO and Apache HTTP Components Core.
Browse files Browse the repository at this point in the history
  • Loading branch information
three4clavin committed Jan 19, 2011
1 parent 4840d1b commit 52a5759
Show file tree
Hide file tree
Showing 153 changed files with 2,525 additions and 318 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ collection-utils/.classpath
collection-utils/.project
collection-utils/.settings/
collection-utils/release/
http-utils/.classpath
http-utils/.project
http-utils/.settings/
http-utils/release/
http-utils/bin/com
release-build/.classpath
release-build/.project
release-build/.settings/
release-build/release/
73 changes: 71 additions & 2 deletions apache-commons/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
<project default="main">
<property name="http-client-version" value="4.0.3"/>
<property name="http-client-package" value="httpcomponents-client-${http-client-version}"/>
<property name="http-core-version" value="4.1"/>
<property name="http-core-package" value="httpcomponents-core-${http-core-version}"/>
<property name="mime4j-version" value="0.6.1"/>
<property name="mime4j-package" value="apache-mime4j-${mime4j-version}"/>
<property name="io-version" value="2.0.1"/>
<property name="io-package" value="commons-io-${io-version}"/>

<target name="main" depends="prepare, clean, extract, repackage" description="Main target">
<echo>Full build complete.</echo>
Expand All @@ -23,6 +29,18 @@
<unzip src="download/${http-client-package}-bin.zip" dest="release"/>
</target>

<target name="extract-httpcore" description="Extracts the necessary libs from the Apache HTTP Components Core download">
<unzip src="download/${http-core-package}-bin.zip" dest="release"/>
</target>

<target name="extract-mime4j" description="Extracts the necessary libs from the Apache James Mime4j download">
<unzip src="download/${mime4j-package}-bin.zip" dest="release"/>
</target>

<target name="extract-io" description="Extracts the necessary libs from the Apache IO Commons download">
<unzip src="download/${io-package}-bin.zip" dest="release"/>
</target>

<target name="repackage-httpclient" description="Repackages necessary libs from the Apache HTTP Components to remove unneeded files">
<move todir="release">
<fileset dir="release/${http-client-package}/lib" includes="*.jar"/>
Expand All @@ -36,11 +54,62 @@
<delete dir="release/${http-client-package}"/>
</target>

<target name="extract" description="Extracts downloaded libraries" depends="extract-httpclient">
<target name="repackage-httpcore" description="Repackages necessary libs from the Apache HTTP Components to remove unneeded files">
<move todir="release">
<fileset dir="release/${http-core-package}/lib" includes="*.jar"/>
</move>

<mkdir dir="release/${http-core-package}-license"/>
<move todir="release/${http-core-package}-license">
<fileset dir="release/${http-core-package}" includes="*.txt"/>
</move>

<delete dir="release/${http-core-package}"/>
</target>

<target name="repackage-mime4j" description="Repackages necessary libs from the Apache James Mime4j to remove unneeded files">
<move todir="release">
<fileset dir="release/${mime4j-package}/lib" includes="*.jar"/>
</move>
<move todir="release">
<fileset dir="release/${mime4j-package}" includes="*.jar"/>
</move>

<mkdir dir="release/${mime4j-package}-license"/>
<move todir="release/${mime4j-package}-license">
<fileset dir="release/${mime4j-package}" includes="*.txt"/>
</move>
<move todir="release/${mime4j-package}-license">
<fileset dir="release/${mime4j-package}" includes="DEPENDENCIES"/>
</move>
<move todir="release/${mime4j-package}-license">
<fileset dir="release/${mime4j-package}" includes="LICENSE"/>
</move>
<move todir="release/${mime4j-package}-license">
<fileset dir="release/${mime4j-package}" includes="NOTICE"/>
</move>

<delete dir="release/${mime4j-package}"/>
</target>

<target name="repackage-io" description="Repackages necessary libs from the Apache IO Commons to remove unneeded files">
<move todir="release">
<fileset dir="release/${io-package}" includes="${io-package}.jar"/>
</move>

<mkdir dir="release/${io-package}-license"/>
<move todir="release/${io-package}-license">
<fileset dir="release/${io-package}" includes="*.txt"/>
</move>

<delete dir="release/${io-package}"/>
</target>

<target name="extract" description="Extracts downloaded libraries" depends="extract-httpclient, extract-httpcore, extract-mime4j, extract-io">
<echo>Downloaded packages extracted.</echo>
</target>

<target name="repackage" description="Repackages extracted libraries" depends="repackage-httpclient">
<target name="repackage" description="Repackages extracted libraries" depends="repackage-httpclient, repackage-httpcore, repackage-mime4j, repackage-io">
<echo>Extracted libraries repackaged.</echo>
</target>
</project>
Binary file not shown.
Binary file added apache-commons/download/commons-io-2.0.1-bin.zip
Binary file not shown.
Binary file not shown.
7 changes: 4 additions & 3 deletions bc-catalog-objects/build.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" ?>
<project default="main">
<property name="release-package-name" value="bc-commons-catalog-objects"/>
<property name="release-package-version" value="3.0"/>
<property name="json-org-jar" value="../json-org/release/json-org.jar"/>

<path id="project.class.path">
Expand Down Expand Up @@ -32,7 +33,7 @@
<target name="clean" description="Clean target">
<echo>Cleaning project:</echo>
<delete>
<fileset dir="release" includes="${release-package-name}.jar"/>
<fileset dir="release" includes="**/*"/>
<fileset dir="javadoc" includes="**/*"/>
</delete>
<delete dir="bin/com" />
Expand All @@ -53,7 +54,7 @@
author="true"
version="true"
use="true"
windowtitle="${release-package-name}">
windowtitle="${release-package-name} - v${release-package-version}">
<classpath refid="project.class.path"/>
<doctitle><![CDATA[<h1>com.brightcove.commons.catalog.objects</h1>]]></doctitle>
<bottom><![CDATA[<i>http://opensource.brightcove.com/.</i>]]></bottom>
Expand All @@ -62,7 +63,7 @@

<target name="release" description="Compression target">
<echo>Building jar file:</echo>
<jar jarfile="release/${release-package-name}.jar" duplicate="fail" whenmanifestonly="fail">
<jar jarfile="release/${release-package-name}-${release-package-version}.jar" duplicate="fail" whenmanifestonly="fail">
<fileset dir="bin" includes="**/*"/>
<fileset dir="src" includes="**/*"/>
</jar>
Expand Down
4 changes: 2 additions & 2 deletions bc-catalog-objects/javadoc/allclasses-frame.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:07:00 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:04 EST 2011 -->
<TITLE>
All Classes (bc-commons-catalog-objects)
All Classes (bc-commons-catalog-objects - v3.0)
</TITLE>


Expand Down
4 changes: 2 additions & 2 deletions bc-catalog-objects/javadoc/allclasses-noframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:07:00 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:04 EST 2011 -->
<TITLE>
All Classes (bc-commons-catalog-objects)
All Classes (bc-commons-catalog-objects - v3.0)
</TITLE>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:56 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:00 EST 2011 -->
<TITLE>
CuePoint (bc-commons-catalog-objects)
CuePoint (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.CuePoint class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CuePoint (bc-commons-catalog-objects)";
parent.document.title="CuePoint (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:00 EST 2011 -->
<TITLE>
CustomField (bc-commons-catalog-objects)
CustomField (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.CustomField class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="CustomField (bc-commons-catalog-objects)";
parent.document.title="CustomField (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:00 EST 2011 -->
<TITLE>
Image (bc-commons-catalog-objects)
Image (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Image class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Image (bc-commons-catalog-objects)";
parent.document.title="Image (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:00 EST 2011 -->
<TITLE>
Playlist (bc-commons-catalog-objects)
Playlist (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Playlist class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Playlist (bc-commons-catalog-objects)";
parent.document.title="Playlist (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:01 EST 2011 -->
<TITLE>
Playlists (bc-commons-catalog-objects)
Playlists (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Playlists class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Playlists (bc-commons-catalog-objects)";
parent.document.title="Playlists (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:01 EST 2011 -->
<TITLE>
Rendition (bc-commons-catalog-objects)
Rendition (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Rendition class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Rendition (bc-commons-catalog-objects)";
parent.document.title="Rendition (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:01 EST 2011 -->
<TITLE>
Video (bc-commons-catalog-objects)
Video (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Video class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Video (bc-commons-catalog-objects)";
parent.document.title="Video (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down Expand Up @@ -719,7 +719,17 @@ <H2>
<TD><CODE><B><A HREF="../../../../../com/brightcove/commons/catalog/objects/Video.html#toJson()">toJson</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Converts the video into a JSON object suitable for use with the Media API</TD>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Converts the video into a JSON object suitable for use with the Media API</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;org.json.JSONObject</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../com/brightcove/commons/catalog/objects/Video.html#toJson(java.util.EnumSet)">toJson</A></B>(java.util.EnumSet&lt;<A HREF="../../../../../com/brightcove/commons/catalog/objects/enumerations/VideoFieldEnum.html" title="enum in com.brightcove.commons.catalog.objects.enumerations">VideoFieldEnum</A>&gt;&nbsp;includeNullFields)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Converts the video into a JSON object suitable for use with the Media API</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
Expand Down Expand Up @@ -2469,13 +2479,38 @@ <H2>
public org.json.JSONObject <B>toJson</B>()
throws org.json.JSONException</PRE>
<DL>
<DD><p>Converts the video into a JSON object suitable for use with the Media API</p>
<DD><p>
Converts the video into a JSON object suitable for use with the Media API
</p>

<p>
Null values will not be included in the JSON sent to the server.
</p>
<P>
<DD><DL>

<DT><B>Returns:</B><DD>JSON object representing the video
<DT><B>Throws:</B>
<DD><CODE>org.json.JSONException</CODE></DL>
<DD><CODE>org.json.JSONException</CODE> - If the video object can not be properly converted into JSON</DL>
</DD>
</DL>
<HR>

<A NAME="toJson(java.util.EnumSet)"><!-- --></A><H3>
toJson</H3>
<PRE>
public org.json.JSONObject <B>toJson</B>(java.util.EnumSet&lt;<A HREF="../../../../../com/brightcove/commons/catalog/objects/enumerations/VideoFieldEnum.html" title="enum in com.brightcove.commons.catalog.objects.enumerations">VideoFieldEnum</A>&gt;&nbsp;includeNullFields)
throws org.json.JSONException</PRE>
<DL>
<DD><p>
Converts the video into a JSON object suitable for use with the Media API
</p>
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>includeNullFields</CODE> - Set of fields to include in the JSON sent to the server, even if they are null values
<DT><B>Returns:</B><DD>JSON object representing the video
<DT><B>Throws:</B>
<DD><CODE>org.json.JSONException</CODE> - If the video object can not be properly converted into JSON</DL>
</DD>
</DL>
<HR>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_22) on Sun Jan 16 15:06:57 EST 2011 -->
<!-- Generated by javadoc (build 1.5.0_22) on Wed Jan 19 15:29:01 EST 2011 -->
<TITLE>
Videos (bc-commons-catalog-objects)
Videos (bc-commons-catalog-objects - v3.0)
</TITLE>

<META NAME="keywords" CONTENT="com.brightcove.commons.catalog.objects.Videos class">
Expand All @@ -14,7 +14,7 @@
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Videos (bc-commons-catalog-objects)";
parent.document.title="Videos (bc-commons-catalog-objects - v3.0)";
}
</SCRIPT>
<NOSCRIPT>
Expand Down
Loading

0 comments on commit 52a5759

Please sign in to comment.