|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
MeterEventListener | Defines the Meter Event Listener interface. |
NotificationListener | Defines the Notification Listener interface. |
ThreadEventListener | Defines the Thread Event Listener interface. |
Class Summary | |
---|---|
A4wapi | The a4wapi class is a core class providing low level
functionality for interfacing between the Accpac formats of information and
the Java formats. |
ActiveApplication | Represents an activated application on a Sage Accpac ERP database pair. |
ActiveApplications | Collection of active applications on a Sage Accpac ERP database pair (both company and system databases). |
ASCIIComparer | A class providing for ASCII handling of strings. |
Company | Provides details of the company set up in Common Services Company Profile. |
Currency | Provides details of a currency code set up in Common Services An object of this class can be obtained from a DBLink object's getCurrency(...) method. |
CurrencyRate | Represents a currency exchange rate An object of this class can be obtained from DBLink object's getCurrencyRate(...) ,
getCurrencyRateComposite(...) and
getCurrencyRateFloating(...) methods. |
CurrencyTable | Represents a currency table set up in Common Services An object of this class can be obtained from DBLink object's getCurrencyTable(...) method. |
DBLink | Represents a database link or connection to a Sage Accpac ERP company or system database. |
DBQueryResultSet | A ResultSet returning the results of a dbQueryRun result set. |
DBTableMetaData | Metadata for TableMetaData. |
Ecodes | The Ecodes class provides the constants of the ecodes.h header
file of the underlying System Manager C code |
Error | Provides details of an application error. |
Errors | Provides access to the errors raised within the context of the current program. |
FieldChangeEvent | Contains the details of a field change notification. |
FiscalCalendar | The FiscalCalendar class provides methods to access the fiscal
calendar set up in the company. |
FiscalCalendar.DateRange | A date range, as returned by getPeriodDates and
other functions |
GUIDMap | A map between object references and GUIDS to support stateful Internet operation. |
Icon | A class that represents Accpac startup icon. |
InstanceEvent | Contains the details of a revision notification. |
Meter | meters show progress. |
MeterEvent | Contains the details of a meter event as passed to a MeterEventListener |
Multiuser | Provides facilities to control multi-user access to ACCPAC. |
NotificationAdapter | An abstract adapter class for receiving notification events. |
Organization | The Organization class represents an organization as listed in a
SharedDataSet . |
Organizations | A readonly collection of all the organizations set up in Accpac, at the time
that the collection is constructed by a call to
SharedDataSet.getOrganizations() |
Program | Represents an authenticated program with the Sage Accpac System Manager. |
ProgramSet | Provides access to information about the programs installed on the System Manager at the end of the connection. |
Property | Provides access to a persisted property shared over the whole system. |
PropertyBag | Provides access to a persisted property bag shared over the whole system. |
RandomGUID | Routines for creating a random GUID. |
RecordChangeEvent | Contains the details of a field change notification |
Report | Provides facilities for generating reports. |
ReportExportFormat | Provides objects for defining how to export reports. |
ReportParameter | an object for the info of Report Parameters |
ReportParamPresentItem | an object for the presentation item of report parameters whose type are LIST |
RevisionEvent | Contains the details of a revision notification |
Session | Represents an authenticated session with the Sage Accpac System Manager. |
SharedDataSet | Provides access to the shared data directory (FIXME or whatever else we call it). |
ThreadEvent | Contains the details of a thread event as passed to a ThreadEventListener |
View | Represents an Accpac view An object of this class can be created directly by an application (possibly by sub-classing) or it can be obtained from the Program or DBLink object's openView method. |
View.OpenDirectives | Indicates the method to be used when opening a view. |
View.OpenModes | The set of values that can be used to make the mode passed when opening a view. |
View.Protocol | Protocols |
View.Security | Security values which indicate the functionality the user is permitted to access on the view. |
ViewField | Represents a field in an Accpac view FIXME documentation |
ViewFieldPresentationList | Provides access to the presentation list that is exposed by a field in a Sage Accpac view. |
ViewFields | Represents the collection of fields in an Accpac view |
ViewKey | Represents a key defined in an Accpac view |
ViewKeys | Represents the collection of keys in an Accpac view |
Enum Summary | |
---|---|
Company.HandleSituation | Indicates how certain error situations should be handled. |
Currency.BlockDateMatch | Indicates the date matching method used to determine if a currency belongs to a currency block |
Currency.DateMatch | Indicates the date matching method used when determining an exchange rate with respect to a given date |
Currency.NegativeDisplay | Indicates how negative currency amounts should be displayed |
Currency.SymbolDisplay | Indicates how the currency symbol should be displayed with a currency amount |
CurrencyRate.Operator | Defines the operator that should be used when performing currency exchange calculations |
DBLink.DatabaseType | This class defines all the database types used by Accpac |
DBLink.LinkFlags | |
DBLink.LinkType | |
Error.ErrorPriority | Indicates the type of an application error. |
LicenseStatus | The possible license statuses. |
Meter.State | Enumeration of possible states |
Organization.OrganizationType | |
ReportParameter.ReportParamType | |
SharedDataSet.PasswordStatus | The possible statuses that can be returned when processing passwords (e.g. |
SuccessLevel | An enumeration of success levels |
View.FilterOrigin | Specifies the origin from where a filter should be applied |
View.RecordGenerateMode | The mode passed to View.recordGenerate(com.sage.accpac.sm.View.RecordGenerateMode) |
View.ReferentialIntegrity | Indicates the referential integrity setting of a view |
View.RotoType | Indicates the type of a view. |
View.SystemAccess | Indicates the current access mode of a view |
ViewField.ViewFieldPresentationType | Indicates the type of presentation information defined for a field. |
ViewField.ViewFieldType | Defines the possible data types of a view field. |
Exception Summary | |
---|---|
DamagedStringException | The DamagedStringException class is an unchecked equivalent to
the MalformedInputException . |
DBLinkException | The exception that is thrown when a call to any methods of the DBLink fails. |
InvalidCharacterException | Thrown when a character is found that is not mappable to an underlying character set. |
StringTooLongException | The StringTooLongException class provides an unchecked exception
that is thrown when a string is too long to fit into an Accpac field or
similar. |
TemporaryResourceException | Exception indicating something that may fix itself in time. |
UncheckedCharacterCodingException | The UncheckedCharacterCodingException is an unchecked equivalent
of the CharacterCodingException |
UserCanceledException | Exception indicating that the end user requested it |
ViewException | The exception that is thrown when a call to any methods of the View (or ViewFields,...) fails. |
Error Summary | |
---|---|
A4wapiGenericError | Error thrown by the underlying system |
InternalError | The InternalError class represents some form of internal error
in the SAJava system, which should never happen |
Contains the classes that provide access to Sage Accpac ERP System Manager, as well as Sage Accpac ERP application features.
The application may begin by construct a
Session
object.
A Session object represents an authenticated session with the Sage Accpac ERP System Manager.
The application will then construct as many Program
objects as it wants
under that Session
.
Once an application has a Program
, instances of almost all other classes
in the package can be obtained either directly or indirectly from it.
Applications may want to make use of a ProgramSet
object to find
version information etc. before creating a Session object or use a
SharedDataSet
object to list the Organizations that can be
accessed.
After the session has been created applications can access the Session's
ProgramSet
and
SharedDataSet
to find this information.
An application uses the Session class to establish a session with the Sage Accpac ERP System Manager, supplying a set of valid username, password and company database name. It follows this by creating a Program.
Example:
import com.sage.accpac.sm.*; Session session = new Session("ADMIN", "ADMIN", "SAMLTD"); Program program = new Program(session, "XZ", "XZ0001", "10A");
Applications can access Sage Accpac application features and data through View
objects.
View objects represent Sage Accpac ERP application views that provide access to application data and business logic.
Example:
import com.sage.accpac.sm.*; View customers = new View(program, "AR0024"); // AR0024 is the view ID of the AR Customers view. while (customers.goNext()) { String custNo = customers.get("IDCUST"); String custName = customers.get("NAMECUST"); // do processing with customer number and name obtained from above }
Here is a more advanced example, showing use of the SharedDataSet and ProgramSet classes.
import com.sage.accpac.sm.*; class Hello { public static void main(String[] args) { try { // What is available on that computer? ProgramSet progSet = new ProgramSet(); // Just as an example if (progSet.Product != ProgramSet.ProductSeries.Enterprise) throw new IllegalStateException ("This program requires Sage Accpac ERP 500 to run"); // Choose a Shared Data Set SharedDataSet dataSet = new SharedDataSet(); String chosenOrg = ChooseOrg (dataSet); // Open a session and Program using the existing program set and shared data set Session s = new Session(progSet, dataSet, "ADMIN", "", chosenOrg, new Date()); Program p = new Program(s, "XZ", "XZ0001", "10A"); // Open a database link to the Company portion of the database DBLink cl = p.OpenDBLink(DBLink.LinkType.Company, DBLink.LinkFlags.ReadOnly); // For demonstration purposes open the bank view and browse through all the banks View bank = cl.OpenView(" BK0001 "); if (bank.goTop()) { dumpBankRecord (bank); while (bank.goNext()) dumpBankRecord (bank); } // Tidy up bank.dispose(); cl.dispose(); p.dispose(); s.dispose(); } catch (View.ViewException e) { System.err.println("View exception reason {0}", e.getReason()); } } // Demonstrate accessing the shared data set private static String chooseOrg(SharedDataSet s) { System.out.println("The Company organizations:"); for (Organization org: s.getOrganizations()) { if (org.Type == Organization.OrganizationType.Company) System.out.printf("%s - %s\n", org.getID(), org.getName()); } return "SAMINC"; } // Dump the current bank record, to demonstrate accessing a view. private static void dumpBankRecord(View bank) { ViewFields f = bank.getFields(); System.out.println("Contents of the Bank record"); System.out.printf("\tBank:\t%s - %s\n", f.get("BANK").getValue(), f.get("NAME").getValue()); System.out.printf("\tTransit:%s\n", f.get("TRANSIT").getValue()); } }
The session class
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |