com.sage.accpac.sm
Interface ActiveApplications

All Superinterfaces:
java.lang.Iterable<ActiveApplication>, ModifiableApplications

public interface ActiveApplications
extends java.lang.Iterable<ActiveApplication>, ModifiableApplications

Collection of active applications on a Sage Accpac ERP database pair (both company and system databases).
An object of this class cannot be created directly by an application; it should be obtained from the Program object's getActiveApplications() method.
The collection contains only those entries that were present when getActiveApplications() was called; applications activated since then are not included in the collection. Similarly the actual entries in the collection reflect the state of the application when getActiveApplications() was called.
Since the collection is iterable and the contents are immutable the easiest way to use the collection is in a foreach loop:

 for (ActiveApplication a: s.getActiveApplications()) {
     Process the application a
 }
 

See Also:
ActiveApplication

Method Summary
 boolean contains(java.lang.String prefix)
          returns whether the specified application is included
 ActiveApplication get(int index)
          Get the specified ActiveApplication object by its index in the collection.
 ActiveApplication get(java.lang.String prefix)
          Get the specified ActiveApplication object
 int getCount()
          Get the number of applications in the list.
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from interface com.sage.accpac.sm.ModifiableApplications
add, delete
 

Method Detail

getCount

int getCount()
Get the number of applications in the list. Note that the collection is iterable so you may not need to know how many there are; simply loop on the contents.
 for (ActiveApplication a: s.getActiveApplications()) {
     Process the application a
 }
 

Returns:
the number of applications in the list
See Also:
get(int), Iterable.iterator()

get

ActiveApplication get(int index)
Get the specified ActiveApplication object by its index in the collection. You may want to consider iterating over the collection using an iterator rather than this method.

Parameters:
index - The zero-based index of the object in the collection.
Returns:
the specified ActiveApplication
See Also:
getCount(), Iterable.iterator()

get

ActiveApplication get(java.lang.String prefix)
Get the specified ActiveApplication object

Parameters:
prefix - The application prefix of the application
Returns:
null if the application is not in the list and the application if it is

contains

boolean contains(java.lang.String prefix)
returns whether the specified application is included

Parameters:
prefix - The application prefix of the application
Returns:
true if the application is in the list


Copyright © 2011 Sage Software, Inc. All rights reserved.