<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.5.0_11) on Tue Aug 14 12:50:53 PDT 2007 --> <TITLE> com.perforce.api (Perforce API) </TITLE> <META NAME="keywords" CONTENT="com.perforce.api package"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="com.perforce.api (Perforce API)"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/perforce/api/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </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?com/perforce/api/package-summary.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP 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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Interface Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Cacheable.html" title="interface in com.perforce.api">Cacheable</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" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Class Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Branch.html" title="class in com.perforce.api">Branch</A></B></TD> <TD>Representation of a source control branch.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Change.html" title="class in com.perforce.api">Change</A></B></TD> <TD>Representation of a source control change.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Client.html" title="class in com.perforce.api">Client</A></B></TD> <TD>Representation of a source control client.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Counter.html" title="class in com.perforce.api">Counter</A></B></TD> <TD>Representation of perforce counters.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Debug.html" title="class in com.perforce.api">Debug</A></B></TD> <TD>Utility class used for debugging.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/DirEntry.html" title="class in com.perforce.api">DirEntry</A></B></TD> <TD>Representation of a source control directory.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Env.html" title="class in com.perforce.api">Env</A></B></TD> <TD>Representation of a source control environment.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/EventLog.html" title="class in com.perforce.api">EventLog</A></B></TD> <TD>This class controls an event log.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/FileEntry.html" title="class in com.perforce.api">FileEntry</A></B></TD> <TD>Representation of a source control file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/HashDecay.html" title="class in com.perforce.api">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="../../../com/perforce/api/Job.html" title="class in com.perforce.api">Job</A></B></TD> <TD>Representation of a source control job.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/JobField.html" title="class in com.perforce.api">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="../../../com/perforce/api/Label.html" title="class in com.perforce.api">Label</A></B></TD> <TD>Representation of a source control lablel.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Mapping.html" title="class in com.perforce.api">Mapping</A></B></TD> <TD>Representation of a source control mapping.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/P4JNI.html" title="class in com.perforce.api">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="../../../com/perforce/api/P4Process.html" title="class in com.perforce.api">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="../../../com/perforce/api/SourceControlObject.html" title="class in com.perforce.api">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="../../../com/perforce/api/User.html" title="class in com.perforce.api">User</A></B></TD> <TD>Representation of a source control user.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/Utils.html" title="class in com.perforce.api">Utils</A></B></TD> <TD>Class that contains static utility methods.</TD> </TR> </TABLE> <P> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Exception Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD WIDTH="15%"><B><A HREF="../../../com/perforce/api/CommitException.html" title="class in com.perforce.api">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="../../../com/perforce/api/PerforceException.html" title="class in com.perforce.api">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="../../../com/perforce/api/SubmitException.html" title="class in com.perforce.api">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" title="class in com.perforce.api"><CODE>Env</CODE></A> and <A HREF="../../../com/perforce/api/P4Process.html" title="class in com.perforce.api"><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" title="class in com.perforce.api"><CODE>Env</CODE></A> env; <A HREF="../../../com/perforce/api/Change.html" title="class in com.perforce.api"><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" title="class in com.perforce.api"><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: 2008/01/28 $ $Revision: #7 $</i> <P> <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 BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../com/perforce/api/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </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?com/perforce/api/package-summary.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> <i><a href="doc-files/LICENSE.TXT">Copyright</a> © 2001, Perforce Software, All rights reserved.</i> </BODY> </HTML>
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 8157 | michael | Archiving legacy java api projects which predate the supported P4Java api. | ||
#8 | 6166 | Sivananda Poreddy | Fixing problem with last check related to javadoc | ||
#7 | 6164 | Sivananda Poreddy | Updating the javadoc to include all the new changes | ||
#6 | 6141 | Sivananda Poreddy | Updating the p4package with fixes, some new features, jar update, and doc updates | ||
#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. |