Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.cisco.ipphone.sdk
Class PC

    java.lang.Object
      com.cisco.ipphone.sdk.PC

    public class PC

extends java.lang.Object

This class encapsulates the attributes and functions of a Cisco IP Telephony Personal Computer. The primary purpose of this class is to provide a convenient mechanism for finding relationships between IP Telephony Users and other system components such as Phones, Extensions, and PCs. Methods implemented in this class allow simple, efficient access to that information using service Providers, such as an LDAP Directory Provider.

Method Summary
`User[]` | `getAssociatedUsers(LDAPProvider lp, java.lang.String[] excludedUsers)` Queries the specified LDAP Provider for a list of Users who have this PC defined as their Associated PC
`java.lang.String` | `getId()`
`static PC` | `getPC(java.lang.String id)` The getPC method is used to obtain a reference to a PC object which has the specified, unique id.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### getPC

    public static PC getPC(java.lang.String id)

  The getPC method is used to obtain a reference to a PC object which has the specified, unique id. PC objects cannot be directly instantiated with a `new` command since there are no public constructors - instead a reference is obtained to a given PC by calling this method. This architecture has the added benefit of being able to directly compare PC objects for equality - since there is guaranteed to be only one object in existence with a given, unique id. This also has the effect of minimizing memory utilization since only a single instance of a given PC object exists within the JVM.

  Parameters:
    `id` - the unique id (IP address or hostname) of the requested PC
  Returns:
    the PC object with the given id. If the PC with this id does not exist, it is created and returned.

### getId

    public java.lang.String getId()

  Returns:
    the unique ID of this PC

### getAssociatedUsers

    public User[] getAssociatedUsers(LDAPProvider lp,
                                     java.lang.String[] excludedUsers)

  Queries the specified LDAP Provider for a list of Users who have this PC defined as their Associated PC

  Parameters:
    `lp` - the LDAPProvider
    `excludedUsers` - an Array of Strings containing UserIds which should NOT be returned in the result. If excludedUsers is either `null` or an empty Array, all matching Users will be returned. Typically there would only be one User returned, but in shared-PC environemnts, there could obviously be multiple. If no Users were found or the query fails, an empty Array (length=0) will be returned.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD