<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon Aug 05 13:17:01 EDT 2002 --> <TITLE> Perforce API: Package com.perforce.api </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV PACKAGE NEXT PACKAGE</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <H2> Package com.perforce.api </H2> Provides classes for accessing Perforce objects (<a href="doc-files/LICENSE.TXT"><font color="red"><b>LICENSE</b></font></a>). <P> <B>See: </B> <BR> <A HREF="#package_description"><B>Description</B></A> <P> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Interface Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Cacheable.html"><I>Cacheable</I></A></B></TD> <TD>An interface that indicates the implementing class can be cached for some period of time.</TD> </TR> </TABLE> <P> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Class Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Branch.html">Branch</A></B></TD> <TD>Representation of a source control branch.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Change.html">Change</A></B></TD> <TD>Representation of a source control change.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Client.html">Client</A></B></TD> <TD>Representation of a source control client.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Counter.html">Counter</A></B></TD> <TD>Representation of perforce counters.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Debug.html">Debug</A></B></TD> <TD>Utility class used for debugging.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="DirEntry.html">DirEntry</A></B></TD> <TD>Representation of a source control directory.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Env.html">Env</A></B></TD> <TD>Representation of a source control environment.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="EventLog.html">EventLog</A></B></TD> <TD>This class controls an event log.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="FileEntry.html">FileEntry</A></B></TD> <TD>Representation of a source control file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="HashDecay.html">HashDecay</A></B></TD> <TD>This hashtable build to contain objects that will decay over time.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Job.html">Job</A></B></TD> <TD>Representation of a source control job.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="JobField.html">JobField</A></B></TD> <TD>Data class for p4 jobspec field information.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Label.html">Label</A></B></TD> <TD>Representation of a source control lablel.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Mapping.html">Mapping</A></B></TD> <TD>Representation of a source control mapping.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="P4JNI.html">P4JNI</A></B></TD> <TD>This class handles the Java Native Interface to the P4 libraries.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="P4Process.html">P4Process</A></B></TD> <TD>Handles the execution of all perforce commands.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="SourceControlObject.html">SourceControlObject</A></B></TD> <TD>An abstract base class for all source control objects.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="User.html">User</A></B></TD> <TD>Representation of a source control user.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="Utils.html">Utils</A></B></TD> <TD>Class that contains static utility methods.</TD> </TR> </TABLE> <P> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Exception Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="CommitException.html">CommitException</A></B></TD> <TD>Signals that an exception occurred during the process of committing a cacheable object to perforce.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="PerforceException.html">PerforceException</A></B></TD> <TD>Signals that a general exception occurred when working with Perforce.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="SubmitException.html">SubmitException</A></B></TD> <TD>Signals that an exception occurred during a submit to Perforce.</TD> </TR> </TABLE> <P> <A NAME="package_description"><!-- --></A><H2> Package com.perforce.api Description </H2> <P> Provides classes for accessing Perforce objects (<a href="doc-files/LICENSE.TXT"><font color="red"><b>LICENSE</b></font></a>). These classes can be used to write higher-level scripts and applications in Java, which is the definition of an API. <p> This software is provided <a href="doc-files/LICENSE.TXT"><font color="red"><b>'AS IS' with NO WARRANTY!</b></font></a> <p> The current implementation acts as a wrapper around the execution of command line requests. There has been some development done in an attempt to utilize the P4API directly through the Java Native Interface. When this work is completed, it will be possible convert to its use without changing the underlying objects. <h2>Usage Overview</h2> The key classes in this package are <A HREF="../../../com/perforce/api/Env.html"><CODE>Env</CODE></A> and <A HREF="../../../com/perforce/api/P4Process.html"><CODE>P4Process</CODE></A>. All the remaining object representation rely on these two. The <code>Env</code> must be instantiated and configured before using it with other classes. The <code>P4Process</code> may never be instantiated directly, but it is where the actual command is executed. This is extremely useful, if the classes provided do not provide the functionality you need. <h3>Example</h3> In this example, the method performs and integration and commits the change. <pre> public void doIt() { <A HREF="../../../com/perforce/api/Env.html"><CODE>Env</CODE></A> env; <A HREF="../../../com/perforce/api/Change.html"><CODE>Change</CODE></A> chng; StringBuffer sb; env = new Env(); env.setUser("jdoe"); env.setPassword("secret"); env.setClient("jdoe-pc"); chng = new Change(env); chng.setDescription("Integration from staging to release."); try { chng.store(); sb = new StringBuffer(); chng = <A HREF="../../../com/perforce/api/Branch.html"><CODE>Branch</CODE></A>.<A HREF="../../../com/perforce/api/Branch.html#integrate(com.perforce.api.Env, java.lang.String, java.lang.String, java.lang.StringBuffer, com.perforce.api.Change)"><CODE>integrate</CODE></A>(env, "//depot/docs/stage/...", "stage2release", sb, chng); chng.submit(); } catch (CommitException e) { System.err.println("Unable to store new change."); } catch (SubmitException e) { System.err.println("Unable to submit changelist into Perforce."); } catch (PerforceException e) { System.err.println("Unable to integrate files: "+sb); } } </pre> <i>Last Updated: $Date: 2006/06/11 $ $Revision: #1 $</i> <P> <DL> <DT><B>See Also: </B><DD><a href="doc-files/LICENSE.TXT"><font color="red"><b>LICENSE<b></font></a> <!-- <h2>Package Specification</h2> ##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT ##### <ul> <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a> </ul> <h2>Related Documentation</h2> For overviews, tutorials, examples, guides, and tool documentation, please see: <ul> <li><a href="">##### REFER TO NON-SPEC DOCUMENTATION HERE #####</a> </ul> --> <!-- Put @see and @since tags down here. --></DL> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a target="_top" href="http://www.perforce.com/"><img alt="Perforce" border="0" height="44" width="151" src="doc-files/perforce_logo.gif"></a></EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV PACKAGE NEXT PACKAGE</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <i><a href="doc-files/LICENSE.TXT">Copyright</a> © 2001, Perforce Software, All rights reserved.</i> </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5499 | Erik Schalburg | Initial branch | ||
//public/perforce/api/java/p4package/docs/com/perforce/api/package-summary.html | |||||
#5 | 2002 | David Markley | Integrated the latest changes for p4package to the public depot. | ||
#4 | 1808 | David Markley |
Updated Env class and fixed fstat issues. Published new Javadocs. |
||
#3 | 1361 | David Markley | Added convenience methods to the Env class. | ||
#2 | 1334 | David Markley |
Added more example code. Added the Counter class. Corrected the filelog methods for the FileEntry class. |
||
#1 | 1043 | David Markley | Initial branch to public area. | ||
//guest/david_markley/p4package/docs/com/perforce/api/package-summary.html | |||||
#2 | 1037 | David Markley | Updated the documentation. | ||
#1 | 1020 | David Markley |
Added Perforce Java API documentation. This is generated using JavaDoc. |