com.cisco.provisioning.cpe.api
Interface Configuration

All Superinterfaces:
ProvAPI
All Known Subinterfaces:
Batch

public interface Configuration
extends ProvAPI

The Configuration interface contains configuration operations common to all sectors of BPR.

BPR APIs are defined with arguments and properties. Arguments are given to indicate the most commonly used fields that must be specified in an API call. In many cases, arguments may be set to NULL. Properties are specified in the form of a map containing key/value pairs.


Method Summary
 void addClassOfService(DeviceType deviceType, String cosName, Map<String,Object> properties)
          Defines a class of service.
 void addCustomPropertyDefinition(String customPropertyName, DataType customPropertyDataType)
          Adds a custom property definition to BPR.
 void addDHCPCriteria(String criteriaName, String clientClass, String includeSelectionTags, String excludeSelectionTags, Map<String,Object> properties)
          Adds a DHCP Scope Selection Criteria to the database.
 void addFile(FileType type, String name, byte[] filebytes, Map<String,Object> properties)
          Adds a file to the system.
 void addLicenseKey(byte[] licenseFileContent)
          Adds a license key to BPR.
 void addUser(String userId, String password, Map<String,Object> properties)
          This method is used to create a new user in the database.
 void changeClassOfServiceProperties(String cosName, Map<String,Object> propToAdd, List<String> propToRemove)
          Changes the properties of a class of service.
 void changeDHCPCriteriaClientClass(String criteriaName, String newClientClass)
          Changes a DHCP Scope Selection Criteria's client class.
 void changeDHCPCriteriaExcludeSelectionTags(String criteriaName, String newExcludeSelectionTags)
          Changes a DHCP Scope Selection Criteria's Exclude Selection Tags.
 void changeDHCPCriteriaIncludeSelectionTags(String criteriaName, String newIncludeSelectionTags)
          Changes a DHCP Scope Selection Criteria's Include Selection Tags.
 void changeDHCPCriteriaProperties(String criteriaName, Map<String,Object> properties, List<String> propertyRemoves)
          Changes a DHCP Scope Selection Criteria's properties.
 void changeDPEDefaults(Map<String,Object> properties, List<String> propertyRemoves)
          Changes DPE default properties.
 void changeExtensionPointSettings(Map<String,Object> properties, List<String> propertyRemoves)
          Changes Network Registrar extension point settings.
 void changeFileProperties(String name, Map<String,Object> propToAdd, List<String> propToRemove)
          Changes the properties of a file.
 void changeProvGroupProperties(String provGroupName, Map<String,Object> propToAdd, List<String> propToRemove)
          Changes the properties of a provision group.
 void changePublishingPluginSettings(String plugin_name, Map<String,Object> properties, List<String> propertyRemoves)
          Changes the publishing plugin defaults.
 void changeRDUDefaults(Map<String,Object> properties, List<String> propertyRemoves)
          Changes RDU default properties.
 void changeSystemDefaults(Map<String,Object> properties, List<String> propertyRemoves)
          Changes system default properties.
 void changeUser(String userId, String password, Map<String,Object> properties)
          Method to modify user properties.
 void deleteClassOfService(String cosName)
          Deletes the specified class of service.
 void deleteCNR(String cnrHost)
          Deletes a Network Registrar server entry in the RDU.
 void deleteDHCPCriteria(String criteriaName)
          Deletes a DHCP Scope Selection Criteria.
 void deleteDPE(String dpeHost)
          Deletes a DPE server entry in the RDU.
 void deleteFile(String name)
          Deletes a file from the system.
 void deleteLicenseKey(String serialNumber)
          Deletes a license key from BAC.
 void deleteProvisioningGroup(String provGroupName)
          Delete the specified provisioning group from BPR.
 void deleteUser(String userId)
          Method to delete a user from database.
 void disablePublishingPlugin(String pluginClassname)
          Disables a publishing plugin.
 void enablePublishingPlugin(String pluginClassname)
          Enables a publishing plugin.
 void getAllClassesOfService(DeviceType deviceType)
          Gets a list of the names of all classes of service for the specified device type.
 void getAllCNRs()
          Retrieve a list of all the Network Registrar servers currently registered with the system.
 void getAllCustomPropertyDefinitions()
          Gets a Map of all custom property definitions currently defined in the system.
 void getAllDHCPCriterias()
          Gets a list of all DHCP Scope Selection Criterias defined in the system.
 void getAllDPEs()
          Retrieve a list of all the DPE servers currently registered with the system.
 void getAllFileTypes()
          Retrieves a List of the pre-defined FileType objects in the database.
 void getAllLicenseInfo()
          Gets a Map of objects listing the enabled technologies and the enabled licensable functions for the system deployment.
 void getAllProvGroups()
          Retrieve a list of all the provisioning groups.
 void getAllRDUs()
          Retrieve a list of all the RDU servers currently registered with the system.
 void getAllSystemPropertyDefinitions()
          Gets a Map of all pre-defined property definitions.
 void getAllUsers()
          Method to get all users present in the system.
 void getClassOfServiceProperties(String cosName)
          Gets the properties for the given class of service.
 void getCNRDetails(String cnrHost)
          Retrieve the details for a given Network Registrar server.
 void getDHCPCriteriaDetails(String criteriaName)
          Gets Details of a DHCP Scope Selection Criteria.
 void getDPEDefaults()
          Retrieve the DPE defaults in a map.
 void getDPEDetails(String dpeHost)
          Retrieve the details of the specified DPE server.
 void getExtensionPointSettings()
          Get the Network Registrar extension point settings (the ones related to BPR) in a map.
 void getFileBytes(String name)
          Gets the bytes of a file from the system.
 void getFileProperties(String name)
          Gets the properties of a file from the system.
 void getLicenseKeyData()
          Gets a List of Maps of expanded license key data for all licenses which have been added to BPR.
 void getMatchingFilenames(FileSearchType searchType, SearchBookmark sb, int numberToReturn)
          Get a list of files that match specific file type or file name criteria.
 void getProvGroupDetails(String provGroupName)
          Get the details of a provisioning group.
 void getPublishingPlugins()
          Gets the list of publishing plugins.
 void getPublishingPluginSettings(String plugin_name)
          Retrieve the publishing defaults for a given publishing plugin.
 void getRDUDefaults()
          Retrieve the RDU defaults in a map.
 void getRDUDetails(String rduHost)
          Retrieve the details for a given RDU server.
 void getSystemDefaults()
          Retrieve the system defaults in a map.
 void getUserDetails(String userId)
          Retrieve the details for a given User.
 void removeCustomPropertyDefinition(String removeCustomPropertyName)
          Removes a custom property definition from BPR.
 void replaceFile(String name, byte[] filebytes)
          Replaces the bytes of an existing file in the system.
 

Method Detail

addClassOfService

void addClassOfService(DeviceType deviceType,
                       String cosName,
                       Map<String,Object> properties)
Defines a class of service.

This method will fail if the name parameter is specified as null, if it contains only whitespace characters, or if it starts with the TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the deviceType parameter is specified as null or if the specified device type has not yet been registered with the system (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified properties Map contains values that are not relevant to this class of service or the property value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified deviceType parameter is DeviceType.DOCSIS and the properties Map does not contain a value for ClassOfServiceKeys.COS_DOCSIS_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified deviceType parameter is DeviceType.PACKET_CABLE_MTA and the properties Map does not contain a value for ClassOfServiceKeys.COS_PACKET_CABLE_MTA_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified deviceType parameter is DeviceType.CABLEHOME_WAN_MAN and the properties Map does not contain a value for ClassOfServiceKeys.COS_CABLEHOME_WAN_MAN_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified properties Map contains a ClassOfServiceKeys key for the class of service external file name and that file has not yet been registred with the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

This method will fail if the specified class of service name already exists for the specified device type (error: CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_EXISTS)

Parameters:
deviceType - Identifies which device type to add this class of service for. This value is required and cannot be null.
cosName - The name of the class of service that, within the given type, uniquely identifies this class of service. This value is required, cannot be null or empty string and must not contain characters other than letters, digits, "-" and "-".
properties - A Map of properties to associate with this class of service. See DeviceType for the valid key names. The properties map cannot be null and must specify the a non-null value for the CoS file name parameter particularly for the DeviceTypes - DOCSISModem and PacketCableMTA. For other DeviceTypes, if not used pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch  = conn.newBatch();
  Map cosProp = new HashMap();
  cosProp.put(ClassOfServiceKeys.COS_DOCSIS_FILE, docsisFile1);
  batch.addClassOfService(DeviceType.DOCSIS,"Gold",cosProp);
  status = batch.post();
  if ( status.isError() )
  {
     //Process batch failure
  }
  ...
 
See Also:
CommandStatusCode, CommandStatus, ClassOfServiceKeys

changeClassOfServiceProperties

void changeClassOfServiceProperties(String cosName,
                                    Map<String,Object> propToAdd,
                                    List<String> propToRemove)
Changes the properties of a class of service.

Note: You cannot change the name or type of a class of service. You can only change the set of properties which may have been associated with that class of service, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter).

Note: This command, if successful, will contact the Configuration Regeneration Service and regenerate all the devices assigned the Class of Service that was changed with this command. The command will return immediately with BatchStatusCode.BATCH_WARNING. CRS will fire a CRSCompleteListener.CRS_COMPLETED event once it has completed regenerating the configuration for all devices with the changed Class of Service.

This method will fail if the name parameter is specified as null or if it contains only whitespace character (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This command will fail if the name parameter starts with the TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified class of service does not yet exist for the specified device type (error: CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)

This method will fail if the specified properties Map contains a ClassOfServiceKeys key for the class of service external file name and that file has not yet been registred with the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

This method will fail if the deviceType associated with this class of service is DeviceType.DOCSIS and the propToRemove contains a value for ClassOfServiceKeys.COS_DOCSIS_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the deviceType associated with this class of service is DeviceType.PACKET_CABLE_MTA and the propToRemove contains a value for ClassOfServiceKeys.COS_PACKET_CABLE_MTA_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the deviceType associated with this class of service is DeviceType.CABLEHOME_WAN_MAN and the propToRemove contains a value for ClassOfServiceKeys.COS_CABLEHOME_WAN_MAN_FILE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the properties specified in the propToAdd parameter are relevant properties for the specified cos but the property value is null or data type is invalid. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the propToAdd parameter also exist in propToRemove parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

Parameters:
cosName - The name of the class of service that, within the given type, uniquely identifies this class of service. This value is required, cannot be null or empty string and must not contain characters other than letters, digits, "-" and "-".
propToAdd - A Map of additional or changed properties to associate with this class of service. See DeviceType for the valid key names. The CoS file name parameter cannot be changed to null particularly for the DeviceTypes DOCSISModem and PacketCableMTA. For other DeviceTypes, if not used pass null.
propToRemove - A list of property names to remove from this class of service. The CoS file name parameter cannot be listed in the properties to remove list particularly for the DeviceTypes DOCSISModem and PacketCableMTA. For other DeviceTypes, if not used pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  Map propAdd = new HashMap();
  List propRemoves = new ArrayList();
  propAdd.put(ClassOfServiceKeys.COS_DOCSIS_FILE, docsisFile1);
  propRemoves.add(SNMPPropertyKeys.READ_COMMUNITY_STRING);

  batch = conn.newBatch();
  batch.changeClassOfServiceProperties( "gold",
                                        propAdd,
                                        propRemoves);
  status = batch.post();
  if ( status.isError() )
  {
     // Process batch error
  }
  ...
 
See Also:
CommandStatusCode, CommandStatus, ClassOfServiceKeys

getAllClassesOfService

void getAllClassesOfService(DeviceType deviceType)
Gets a list of the names of all classes of service for the specified device type.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of the Strings that are the names of all defined classes of service. If there is no classes of service is found, an empty list will be returned.

This method will fail if the deviceType parameter is specified as null or if the specified device type has not yet been registered with the system (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
deviceType - Identifies the device type of the class of service names to retrieve. This value is required and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch = conn.newBatch();
  batch.getAllClassesOfService(DeviceType.DOCSIS);
  status = batch.post();
  if ( status.isError() )
  {
      //Process batch error
  }
  ...
 
See Also:
CommandStatusCode, CommandStatus

getClassOfServiceProperties

void getClassOfServiceProperties(String cosName)
Gets the properties for the given class of service.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data CommandStatus.DATA_MAP. The Map will consist of the key-value pairs which have been associated with this classes of service.

This method will fail if the name parameter is specified as null or if it contains only whitespace character (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This command will fail if the name parameter starts with the TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified class of service does not yet exist for the specified device type (error: CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)

Parameters:
cosName - The name of the class of service that, within the given type, uniquely identifies this class of service. This value is required, cannot be null or empty string and must not contain characters other than letters, digits, "-" and "-".

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch = conn.newBatch();
  batch.getClassOfServiceProperties("gold");
  status = batch.post();
  if ( status.isError() )
  {
     // Process batch error
  }
  else
  {
      commandStatus = bstat.getCommandStatus(0);
      Map resultMap = (Map) commandStatus.getData();
      Iterator keys = resultMap.keySet().iterator();
      System.out.println("Properties for DOCSIS COS");
      while (keys.hasNext())
      {
          String key = (String)keys.next();
          System.out.println(key +": " +resultMap.get(key));
      }
  }
  ...
 
See Also:
CommandStatusCode

deleteClassOfService

void deleteClassOfService(String cosName)
Deletes the specified class of service.

This method will fail if the cosName parameter is specified as null or if it contains only whitespace character (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This command will fail if the cosName parameter starts with the TechnologyDefaultsKeys.DEFAULT_COS_PREFIX value (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if deviceType which is associated with the specified cosName is null or if the specified device type has not yet been registered with the system (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified class of service does not yet exist in the database(error: CommandStatusCode.CMD_ERROR_CLASS_OF_SERVICE_UNKNOWN)

This method will fail if the specified class of service has any devices associated with it (error: CommandStatusCode.CMD_ERROR_WRITE)

This method will fail if the name parameter specifies the special case default class of service name, which cannot be deleted (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
cosName - The name of the class of service that, within the given type, uniquely identifies this class of service. This value is required, cannot be null or empty string and must not contain characters other than letters, digits, "-" and "-".

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch = conn.newBatch();
  batch.deleteClassOfService("gold");
  status = batch.post();
  if ( status.isError() )
  {
      // Process batch error
  }
  ...
 
See Also:
CommandStatusCode

changeSystemDefaults

void changeSystemDefaults(Map<String,Object> properties,
                          List<String> propertyRemoves)
Changes system default properties.

This method will fail if the specified properties Map contains values that are not relevant to system properties or the key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

Parameters:
properties - The map of default properties to add/change. If a property already exists, the old value will be replaced with the new value. If no properties are being added/modified, pass null.
propertyRemoves - The list of default property key names to remove. If no properties are being removed, pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
        ...
        Map sysMap = new HashMap();
              sysMap.put(SNMPPropertyKeys.WRITE_COMMUNITY_STRING,"private");
              sysMap.put(SNMPPropertyKeys.READ_COMMUNITY_STRING,"public");

              Batch batch = conn.newBatch();
        batch.changeSystemDefaults(sysMap, null);
        BatchStatus status = batch.post();
        if ( status.isError() )
        {
            // Process batch error
        }
        ...
 
See Also:
CommandStatusCode, CommandStatus

changeRDUDefaults

void changeRDUDefaults(Map<String,Object> properties,
                       List<String> propertyRemoves)
Changes RDU default properties.

This method will fail if the specified properties Map contains values that are not relevant to RDU properties or the key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

The batch containing a call to this method will fail if properties that attach classes to extension points are invalid as a result of the changes specifed specified in the parameters to this call (error: BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)

Parameters:
properties - The map of default properties to add/change. If a property already exists, the old value will be replaced with the new value. If no properties are being added/modified, pass null.
propertyRemoves - The list of default property key names to remove. If no properties are being removed, pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
        ...
        Map rduMap = new HashMap();
        rduMap.put(ServerDefaultsKeys.SERVER_TRACE_ENABLE, Boolean.TRUE);
        rduMap.put(
            ServerDefaultsKeys.RDU_CONFIGURATION_EXTENSION_POINT,
            "testdefaultextpt,testcustomextpt");
        rduMap.put(
            ServerDefaultsKeys.RDU_DEVICE_DETECTION_EXTENSION_POINT,
            "testdetectionextpt");
        rduMap.put(PolicyKeys.PROMISCUOUS_MODE_ENABLED, Boolean.FALSE);

        Batch batch = conn.newBatch();
        batch.changeRDUDefaults(rduMap, null);
        BatchStatus status = batch.post();
        if ( status.isError() )
        {
            // Process batch error
        }
        ...
 
See Also:
ServerDefaultsKeys, BatchStatusCode, CommandStatusCode

changeDPEDefaults

void changeDPEDefaults(Map<String,Object> properties,
                       List<String> propertyRemoves)
Changes DPE default properties.

This method will fail if the specified properties Map contains values that are not relevant to DPE properties or property value is null or datatype is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

Parameters:
properties - The map of default properties to add/change. If a property already exists, the old value will be replaced with the new value. If no properties are being added/modified, pass null.
propertyRemoves - The list of default property key names to remove. If no properties are being removed, pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
      ...
      Map dpeMap = new HashMap();
      dpeMap.put(ServerDefaultsKeys.SERVER_TRACE_ENABLE, Boolean.TRUE);
      Batch batch = conn.newBatch();
      batch.changeDPEDefaults(dpeMap, null);
      BatchStatus status = batch.post();
      if ( status.isError() )
      {
          // Process batch error
      }
      ...
 
See Also:
ServerDefaultsKeys, CommandStatusCode

deleteDPE

void deleteDPE(String dpeHost)
Deletes a DPE server entry in the RDU. This method is intended to clean up any DPE entries that are no longer used.

Note: If the DPE comes online again, it will automatically re-register and create another entry in the list of DPEs.

This method will fail if the dpeHost parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the DPE specified by the dpeHost parameter does not exist (error: CommandStatusCode.CMD_ERROR_DPE_UNKNOWN)

Parameters:
dpeHost - The IP or FQDN of the DPE server to remove from BPR.

Returned Command Status codes:

Events fired:

Returned Data Type code:

Sample Usage:
      ...
      Batch batch = conn.newBatch();
      batch.deleteDPE("localhost");
      BatchStatus status = batch.post();
      if ( status.isError() )
      {
          // Process batch error
      }
      ...
 
See Also:
ServerDefaultsKeys, CommandStatusCode

deleteCNR

void deleteCNR(String cnrHost)
Deletes a Network Registrar server entry in the RDU. This method is intended to clean up any CNR entries that are no longer used.

NOTE - If the Network Registrar comes online again, it will automatically re-register and create another entry in the list of Network Registrar servers.

This method will fail if the cnrHost parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the Network Registrar specified by the cnrHost parameter does not exist (error: CommandStatusCode.CMD_ERROR_CNR_UNKNOWN)

Parameters:
cnrHost - The IP or FQDN of the CNR server to remove from BPR.

Returned Command Status codes:

Events fired:

Returned Data Type code:

Sample Usage:
      ...
      Batch batch = conn.newBatch();
      batch.deleteCNR("localhost");
      BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 
See Also:
ServerDefaultsKeys, CommandStatusCode

changeExtensionPointSettings

void changeExtensionPointSettings(Map<String,Object> properties,
                                  List<String> propertyRemoves)
Changes Network Registrar extension point settings.

This method will fail if the specified properties Map contains values that are not relevant to Network Registrar extension point properties or the key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if any of the required properties has null value after running this command. CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
properties - The map of default properties to add/change. If a property already exists, the old value will be replaced with the new value. If no properties are being added/modified, pass null.
propertyRemoves - The list of default property key names to remove. If no properties are being removed, pass null.

Relevant property keys:

Returned Command Status codes:

Events fired:
Returned Data Type code:

Sample Usage:
      ...
      Map hm = new HashMap();
      hm.put(
          CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_REQUEST_DICTIONARY,
          "chaddr);
      hm.put(
          CNRExtensionSettingKeys.CNR_ATTRIBUTES_TO_READ_FROM_ENVIRONMENT_DICTIONARY,
          "test");
      Batch batch = conn.newBatch();
      batch.changeExtensionPointSettings(hm, null);
      BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 
See Also:
CNRExtensionSettingKeys, CommandStatusCode

changeFileProperties

void changeFileProperties(String name,
                          Map<String,Object> propToAdd,
                          List<String> propToRemove)
Changes the properties of a file.

Note: You cannot change the name or type of a file. You can only change the set of properties which may have been associated with that file, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter). You can also change the file bytes of the file

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name does not exits in BAC (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

This method will fail if the properties specified in the propToAdd parameter are relevant properties for the specified file type but the property value is null or data type is invalid. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the propToAdd parameter also exist in propToRemove parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

The batch containing a call to this method will fail if the specified file is a JAR file containing custom extension classes and the extension configuration is invalid as a result of the replacement file contents specified in the parameters to this call (error: BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)

Parameters:
name - A name that uniquely identifies the file to replace. This value must be specified and cannot be null.
propToAdd - A Map of additional or changed properties to associate with this file.
propToRemove - A list of property names to remove from this file.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  Map propAdd = new HashMap();
  propAdd.put(FileKeys.DESCRIPTION, "Latest update");

  batch = conn.newBatch();
  batch.changFileProperties("gold.bin", propAdd, null);
  status = batch.post();
  if ( status.isError() )
  {
     // Process batch error
  }
  ...
 
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus

changeProvGroupProperties

void changeProvGroupProperties(String provGroupName,
                               Map<String,Object> propToAdd,
                               List<String> propToRemove)
Changes the properties of a provision group.

Note: You cannot change the name of a provision group. You can only change the set of properties which may have been associated with that provision group, either by adding new properties or modifying existing properties (via the "properties" parameter), or by removing properties (via the "propertyRemoves" parameter).

This method will fail if the provGroupName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the propToAdd or propToRemove parameter contains invalid properties, (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the properties specified in the propToAdd parameter are relevant properties for the specified provGroup but the property value is null or data type is invalid. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the propToAdd parameter also exist in propToRemove parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a provision group with the specified name does not exist in the system (error: CommandStatusCode.CMD_ERROR_WRITE)

This method will fail if the propAdd Map contains DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both and the IPAddress list contains invalid IPAddress or duplicated entry (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the propAdd Map contains DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both and the DhcpLeaseQueryKeys.DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE value is set to true (error: CommandStatusCode.CMD_ERROR_WRITE)

Note This command finds and uses the value of this property DhcpLeaseQueryKeys#DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE in the following order:

This method will fail if the specified propToRemove List contains value DhcpLeaseQueryKeys.DHCP_LEASE_QUERY_AUTO_CONFIG_SERVER_LIST_ENABLE (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified propToAdd List contains DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both and the IPAddresses of the CNR server(s) in this provisioning group does not contains the IPAddresses specified in the DhcpLeaseQueryKeys.DHCP_V4_LEASE_QUERY_SERVER_LIST or DhcpLeaseQueryKeys.DHCP_V6_LEASE_QUERY_SERVER_LIST or both (error: CommandStatusCode.CMD_ERROR_WRITE)

Parameters:
provGroupName - A name that uniquely identifies the name of provision group. This value must be specified and cannot be null.
propToAdd - A Map of additional or changed properties to associate with this provision group.
propToRemove - A list of property names to remove from this provision group.

Relevant properties that may be added or removed:

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  Map propAdd = new HashMap();
  propAdd.put(ProvGroupCapabilitiesKeys.ENABLED_CAPABILITIES, 
              ProvGroupCapabilitiesKeys.CABLE_HOME_V4);

  batch = conn.newBatch();
  batch.changeProvGroupProperties("default", propAdd, null);
  status = batch.post();
  if ( status.isError() )
  {
     // Process batch error
  }
  ...
 
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus

getSystemDefaults

void getSystemDefaults()
Retrieve the system defaults in a map.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain key-value pairs for all of the system default properties.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
      ...
       Batch batch = conn.newBatch();
       batch.getSystemDefaults();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 

See Also:
SNMPPropertyKeys, Map

getRDUDefaults

void getRDUDefaults()
Retrieve the RDU defaults in a map.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain key-value pairs for all of the RDU default properties.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getRDUDefaults();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 

See Also:
ServerDefaultsKeys

getDPEDefaults

void getDPEDefaults()
Retrieve the DPE defaults in a map.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain key-value pairs for all of the DPE default properties.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getDPEDefaults();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 

See Also:
ServerDefaultsKeys

getAllDPEs

void getAllDPEs()
Retrieve a list of all the DPE servers currently registered with the system.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of String that the names of DPE server. If there is no DPE servers is currently registered, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getAllDPEs();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
          // Process batch error
       }
       ...
 

See Also:
CommandStatusCode, CommandStatus, List

getAllRDUs

void getAllRDUs()
Retrieve a list of all the RDU servers currently registered with the system.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of String that is the names of the RDU server exist in the system. If there is no RDU server currently registered, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
    ...
          Batch batch = conn.newBatch();
    batch.getAllRDUs();
    BatchStatus status = batch.post();
    if ( status.isError() )
    {
        // Process batch error
    }
    ...
 

See Also:
CommandStatusCode, CommandStatus, List

getAllProvGroups

void getAllProvGroups()
Retrieve a list of all the provisioning groups.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will contain a string that is the names of the provisioning group currently exist in the database. If there is no provisioning groups currently exist in the database, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.getAllProvGroups();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 

See Also:
CommandStatusCode, CommandStatus, List

getDPEDetails

void getDPEDetails(String dpeHost)
Retrieve the details of the specified DPE server.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain properties and values for the specified DPE server.

This method will fail the cnrHost parameter is null or contains all whitespace (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified DPE is unknown to the RDU (error: CommandStatusCode.CMD_ERROR_DPE_UNKNOWN)

Parameters:
dpeHost - The FQDN or IP address for the desired DPE server. This parameter is required and must not be null.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getDPEDetails("localhost");
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 
See Also:
Map

getRDUDetails

void getRDUDetails(String rduHost)
Retrieve the details for a given RDU server.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain properties and values for the specified RDU server.

This method will fail the rduHost parameter is null or contains all whitespace (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the dpecified RDU is unknown (error: CommandStatusCode.CMD_ERROR_RDU_UNKNOWN)

Parameters:
rduHost - The FQDN or IP address of the RDU server. This parameter is required and must not be null.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getRDUDetails("localhost");
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 
See Also:
Map

getAllCNRs

void getAllCNRs()
Retrieve a list of all the Network Registrar servers currently registered with the system.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of the String that are the names of Network Registrar Server. If there is no Network Registrar servers are currently registered, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getAllCNRs();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 

See Also:
CommandStatusCode, CommandStatus

getCNRDetails

void getCNRDetails(String cnrHost)
Retrieve the details for a given Network Registrar server. This will return only those setting related to BPR)

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain properties and values for the specified CNR server.

This method will fail the cnrHost parameter is null or contains all whitespace (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the dpecified Network Registrar is unknown to the RDU (error: CommandStatusCode.CMD_ERROR_CNR_UNKNOWN)

Parameters:
cnrHost - The FQDN or IP address for the desired CNR server.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getCNRDetails("localhost");
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 
See Also:
Map

getExtensionPointSettings

void getExtensionPointSettings()
Get the Network Registrar extension point settings (the ones related to BPR) in a map.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain key-value pairs for all of the extension point settings.

Returned Property Keys:

Returned Command Status Codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getExtensionPointSettings();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           // Process batch error
       }
       ...
 

See Also:
Map

addFile

void addFile(FileType type,
             String name,
             byte[] filebytes,
             Map<String,Object> properties)
Adds a file to the system. Note: To add large files (~17M), the VM of the calling program has to be modified appropriately. Otherwise, an out of memory exception would result when posting the batch.

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters, or if the fileBytes parameter is null, or if the type parameter is null (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name has already been added to the system (error: CommandStatusCode.CMD_ERROR_WRITE)

This method will fail if the type paramater is null (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the properties specified in the properties parameter are relevant properties for the specified file type but the property value is null or data type is invalid. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

The batch containing a call to this method will fail if the specified file is a JAR file and the extension configuration is invalid as a result of the addition of this file (error: BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)

Parameters:
type - The FileType of this file. Once set, this cannot be changed. This value must be specified and cannot be null.
name - A name that uniquely identifies this file. Name string characters are resticted to alphanumeric characters, "-", ".", and "_". All leading and trailing whitespace is automatically trimmed from this value. Names cannot have spaces in them. A dot in the name is optional. This value must be specified and cannot be null.
filebytes - A byte array that contains the entire contents of the file being added to the system. The size of the byte array (and, therefore, of the file) is limited to Integer.MAX_VALUE (2,147,483,647) bytes.
properties - A map of additional attributes for this file. If not used, pass null.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  //extract the contents of a file into a byte array
  //such that it may be passed in as the
  //second parameter of this method:
String pathnamestring = "/tmp/inpFilename.cm"; File f = new File(pathnamestring); RandomAccessFile raf = null; long length = 0; byte[] bytes = null; try { raf = new RandomAccessFile(f, "r"); length = raf.length(); // Maximum byte length of file is // Integer.MAX_VALUE (2,147,483,647) if ( length > (long)Integer.MAX_VALUE ) { // Process "file too long" error System.err.println("File too long!"); return; } bytes = new byte[(int)length]; raf.readFully(bytes); } catch (IOException t) // likely to be IOException { // Do exception processing here return; } Batch batch = conn.newBatch(); batch.addFile(FileType.CABLELABS_CONFIGURATION_TEMPLATE, "gold.cm", bytes, null); BatchStatus bstat = null; bstat = batch.post(); if ( bstat.isError() ) { // Process batch failure } ...
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus, FileListener, FileType

replaceFile

void replaceFile(String name,
                 byte[] filebytes)
Replaces the bytes of an existing file in the system. Files that are from the installation they cannot be replaced because they are Read only files. Note: To add large files (~17M), the VM of the calling program has to be modified appropriately. Otherwise, an out of memory exception would result when posting the batch.

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters, or if the fileBytes parameter is null (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name does not exits in the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

This method will fail if a file is a Read Only file. (error: CommandStatusCode.CMD_ERROR_WRITE)

The batch containing a call to this method will fail if the specified file is a JAR file containing custom extension classes and the extension configuration is invalid as a result of the replacement file contents specified in the parameters to this call (error: BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)

Parameters:
name - A name that uniquely identifies the file to replace. This value must be specified and cannot be null.
filebytes - A byte array that contains the entire contents of the file being added to the system. The size of the byte array (and, therefore, of the file) is limited to Integer.MAX_VALUE (2,147,483,647) bytes.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  byte[] newBytes = null;
  // See comments under
  // addFile()
  // for a Java code example of how to extract the file contents into a
  // byte array (newBytes)
  ...
  Batch batch = conn.newBatch();
  batch.replaceFile("gold.cm", newBytes);

  BatchStatus bstat = null;
  bstat = batch.post();
  if ( bstat.isError() )
  {
      // process batch error
  }
  ...
 
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus, FileListener

deleteFile

void deleteFile(String name)
Deletes a file from the system. Files that are from the installation cannot be deleted because they are Read only files.

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name does not exits in the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

This method will fail if a file with the specified file is related to a Class of Service (error: CommandStatusCode.CMD_ERROR_WRITE)

This method will fail if a file is a Read Only file. (error: CommandStatusCode.CMD_ERROR_WRITE)

The batch containing a call to this method will fail if the specified file is a JAR file containing custom extension classes and the extension configuration is invalid as a result of deleting the file (error: BatchStatusCode.BATCH_FAILED_EXTENSION_RELOAD)

Parameters:
name - A name that uniquely identifies the file to delete. This value must be specified and cannot be null.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch = conn.newBatch();
  batch.deleteFile("gold.cm");
  BatchStatus bstat = batch.post();
  if ( bstat.isError() )
  {
      // Process batch error
  }
  ...
 
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus, FileListener

getMatchingFilenames

void getMatchingFilenames(FileSearchType searchType,
                          SearchBookmark sb,
                          int numberToReturn)
Get a list of files that match specific file type or file name criteria. To get a list of all files, you should search for the file name pattern "*".

Call ((RecordSearchResults)CommandStatus.getData()) on the return from this method to retrieve the data. The RecordSearchResults will consist of the List FileName objects that match the specify file type or file name criteria. If there is no record that match the search criteria, the CommandStatus.DATA_RECORD_SEARCH_RESULTS will contain an empty List.

This method will fail if the searchType parameter is specified as null or searchType is invalid (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the numberToReturn parameter is specified as negative or 0. (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
searchType - the specific FileSearchType over which the file name search will be performed.
sb - The SearchBookmark from which to start the search. If this is null, the search will begin from the first node matched.
numberToReturn - Specify how many matching records to be returned from the search query. If the numberToReuturn is less than or equals 0 an error returned

Returned Command Status codes:

Returned Data Type codes:

Sample Usage:
 
   ...
  
   // Create a new batch.
   //
   Batch batch = s_conn.newBatch();
   
   // create the FileSearchType
   FileSearchType fst = 
         FileSearchType.getFiles(new FileNamePattern("*.cm"));
         
   // Perform a file name search across ALL
   // FileTypes for files matching the name
   // pattern "*.cm"
   //
   batch.getMatchingFilenames(fst, null, 100);
   
   // Submit the batch.
   //
   BatchStatus bstat = batch.post();
   
   // Process the result.
   //
   if (bstat.isError())
   {
       //Process batch error.
   }
   else
   {
       // Get the list of matching file names
       // from the command status.
       //
       CommandStatus cstat = bstat.getCommandStatus(0);
               
       RecordSearchResults results = (RecordSearchResults)cstat.getData();

       List matchingFilenames = (List)results.getRecordData();
   }       

   ...
  
 
See Also:
CommandStatusCode, CommandStatus, FileSearchType

getProvGroupDetails

void getProvGroupDetails(String provGroupName)
Get the details of a provisioning group.

This method will fail if the provGroupName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a provision group with the specified name does not exist in the system (error: CommandStatusCode.CMD_ERROR_QUERY)

Parameters:
provGroupName - A name that uniquely identifies the name of provision group. This value must be specified and cannot be null.

Events fired: None

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;

  batch = conn.newBatch();
  batch.getProvGroupDetails("default");
  status = batch.post();
  if ( status.isError() )
  {
     // Process batch error
  }
  ...
 
See Also:
BatchStatusCode, CommandStatusCode, CommandStatus

addCustomPropertyDefinition

void addCustomPropertyDefinition(String customPropertyName,
                                 DataType customPropertyDataType)
Adds a custom property definition to BPR.

A custom property must be added to BPR, before it may be used in a propeties Map as a parameter to a provisioning API method. Including properties which have not been previously declared will result in command failure at the validation stage.

This method will fail if the customPropertyName parameter or the customPropertyDataType parameter is null (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if an attempt is made to define a custom property name that corresponds exactly to the name of one of the pre-defined BPR property names (error: CommandStatusCode.CMD_ERROR_SYSTEM_PROPERTY_REDEFINITION)

This method will fail if an attempt is made to redefine an existing custom property name (error: CommandStatusCode.CMD_ERROR_CUSTOM_PROPERTY_REDEFINITION)

This method will fail if the customPropertyDataType parameter specified is of type DataType.MAP or DataType.LIST or DataType.LEASE_RESULTS or DataType.SNMPVAR_LIST as these data types are not supported for custom properties (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
customPropertyName - The name of the custom property being defined, e.g. /com/mycompany/property1. This value is required and cannot be null.
customPropertyDataType - The data type of the data which will be stored in association with the custom property name, e.g. DataType.INTEGER. This value is required and cannot be null.

Events fired:

Returned Command Status Codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();

       batch.addCustomPropertyDefinition(
           "/com/mycompany/property1", DataType.STRING);

       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
DataType, CommandStatusCode

removeCustomPropertyDefinition

void removeCustomPropertyDefinition(String removeCustomPropertyName)
Removes a custom property definition from BPR.

Note: removing a custom property from BPR does not remove corresponding property key/value pairs from devices stored in BPR.

This method will fail if the removeCustomPropertyName parameter is null or contains only whitespace (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if an attempt is made to remove a custom property name that has not been previously defined or if the specified property is a pre-defined BPR property name (error : CommandStatusCode.CMD_ERROR_CUSTOM_PROPERTY_UNKNOWN)

Parameters:
removeCustomPropertyName - The name of the custom property definition to be removed from BPR.

Events fired:

Returned Command Status Codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.removeCustomPropertyDefinition("/com/mycompany/property1");
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
CommandStatusCode

getAllCustomPropertyDefinitions

void getAllCustomPropertyDefinitions()
Gets a Map of all custom property definitions currently defined in the system.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the map of all custom property definitions. If there is no custom definition currently defined in the database, this method will returns an empty Map.

The map keys will be the custom property definition names, and the corresponding map values will give the expected DataType for each custom property. If no custom property definitions are found, null will be returned.

Returned Command Status Codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.getAllCustomPropertyDefinitions();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

See Also:
DataType, CommandStatusCode, CommandStatus, Map

getAllSystemPropertyDefinitions

void getAllSystemPropertyDefinitions()
Gets a Map of all pre-defined property definitions.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. If there is no pre-defined property definitions, an empty Map will be returned.

The map keys will be the property definition names, and the corresponding map values will give the expected DataType for each pre-defined property.

Returned Command Status Codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.getAllSystemPropertyDefinitions();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

See Also:
DataType, CommandStatusCode, CommandStatus, Map

addLicenseKey

void addLicenseKey(byte[] licenseFileContent)
Adds a license key to BPR.

Since the encrypted key contains all of the information pertinent to the key, no other parameters are required to call this method.

This method will fail if the licenseFileContent parameter consists entirely of whitespace characters, has no content, is filled with random characters, or the originating license file has been altered. (error: CommandStatusCode.CMD_ERROR_LICENSE_IS_INVALID)

This method will fail if the licenseFileContent parameter is null (error: CommandStatusCode.CMD_ERROR_LICENSE_IS_NULL)

This method will fail if the license key type of the licenseFileContent parameter is not permanent or evaluation (error: CommandStatusCode.CMD_ERROR_LICENSE_IS_NOT_PERM_OR_EVAL)

This method will fail if the licenseFileContent parameter is for an unknown technology type (error: CommandStatusCode.CMD_ERROR_UNKNOWN_TECHNOLOGY_NAME)

This method will fail if the licenseFileContent parameter is for an evaluation license that has already expired (error: CommandStatusCode.CMD_ERROR_EVALUATION_HAS_EXPIRED)

This method will fail if the licenseFileContent is an evaluation license and there is an existing permanent license for the same technology (error: CommandStatusCode.CMD_ERROR_EVAL_LICENSE_REPLACING_EXISTING_PERM_LICENSE)

This method will fail if the licenseFileContent parameter has already been added to the database (error: CommandStatusCode.CMD_ERROR_PERM_OR_EVAL_LICENSE_KEY_ALREADY_EXISTS) *

This method will fail if the serial number of the licenseFileContent parameter has already been added to the database (error: CommandStatusCode.CMD_ERROR_LICENSE_SERIAL_NUMBER_USED)

This method will fail if the licenseFileContent parameter represents an evaluation license and the expiration date of the license is less than that of the license already in the databae (error: CommandStatusCode.CMD_ERROR_EVAL_LICENSE_EXPIRATION_DATE_IS_LESS_THAN_EXISTING_EVAL_LICENSE_EXPIRATION_DATE)

Parameters:
licenseFileContent - the encrypted license key string supplied to the customer. This parameter is required and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
 after conversion of the license file content to a byte array "licenseFileContent"
 Batch batch = conn.newBatch();
 batch.addLicenseKey(licenseFileContent);
 BatchStatus status = batch.post();
 if ( status.isError() )
 {
 //Process batch error
 }
 ...
 
See Also:
CommandStatusCode

getLicenseKeyData

void getLicenseKeyData()
Gets a List of Maps of expanded license key data for all licenses which have been added to BPR.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The list will contain maps of expanded license key data for all licenses which have been added to BPR.

License key Maps will contain the following data:

 /encryptedKey    Map (contains license key serial number and license key itself)
 /isPermanent     Boolean
 /technology      String  (e.g. DOCSIS, Computer, PacketCable, etc.)
 /numSubscribers  Integer # of subscribers this license supports
 /description     String
 /dateInstalled   Long    result of Date.getTime().
 /dateExpires     Long    result of Date.getTime(), or -1 if key is
                          permanent
 

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getLicenseKeyData();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...

 

See Also:
List, Map

deleteLicenseKey

void deleteLicenseKey(String serialNumber)
Deletes a license key from BAC.

Since the encrypted key contains all of the information pertinent to the key, no other parameters are required to call this method.

This method will fail if the SerialNumber parameter is null (error: CommandStatusCode.CMD_ERROR_LICENSE_IS_NULL)

This method will fail if a license with the input SerialNumber parameter doesn't exist in the data store (error: CommandStatusCode.CMD_ERROR_LICENSE_KEY_DOES_NOT_EXIST)

This method will fail if the deletion of the license represented by the SerialNumber parameter will bring the number of properly licensed devices below the number of devices already provisioned in the system's database. CommandStatusCode.CMD_ERROR_LICENSE_NUM_DEVICE_CONSTRAINT)

This methos will fail if a non admin user attempt to delete the license key. CommandStatusCode.CMD_ERROR_NONADMIN_USER_ATTEMPTS_DELETE_LICENSE_KEY)

Parameters:
serialNumber - the unique identifier of the license key that is to be deleted. This parameter is required and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
 ...
 String technology = "DOCSIS";
 String serialNumber = "abcde123456";
 Batch batch = conn.newBatch();
 batch.deleteLicenseKey(serialNumber);
 BatchStatus status = batch.post();
 if ( status.isError() )
 {
 //Process batch error
 }
 ...
 
See Also:
CommandStatusCode

enablePublishingPlugin

void enablePublishingPlugin(String pluginClassname)
Enables a publishing plugin.

Users place publishing plugin classfiles in a well-known directory [locaton: BPR_HOME/rdu/classes] on the RDU server. At start-up time, the RDU loads (and enables) all publishing plugins that are found in that directory. This method supports re-enabling a publishing plugin which has been disabled after RDU start-up time.

This method will fail if the pluginClassname parameters is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if there was an error enabling the specified plugin (error: CommandStatusCode.CMD_ERROR_ENABLE_PLUGIN)

Parameters:
pluginClassname - the classname of the plugin to be enabled. This parameters is required and cannot be null.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String pluginName = new String("LDAPPublisher");
             Batch batch = conn.newBatch();
       batch.enablePublishingPlugin(pluginName);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

disablePublishingPlugin

void disablePublishingPlugin(String pluginClassname)
Disables a publishing plugin.

Users place publishing plugin classfiles in a well-known directory [locaton: BPR_HOME/rdu/classes] on the RDU server. At start-up time, the RDU loads (and enables) all publishing plugins that are found in that directory. This method supports disabling a publishing plugin after RDU start-up time.

This method will fail if the pluginClassname parameters is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if there was an error disabling the specified plugin (error: CommandStatusCode.CMD_ERROR_DISABLE_PLUGIN)

Parameters:
pluginClassname - the classname of the plugin to be disabled. This parameters is required and cannot be null.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String pluginName = new String("LDAPPublisher");
             Batch batch = conn.newBatch();
       batch.disablePublishingPlugin(pluginName);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

getPublishingPlugins

void getPublishingPlugins()
Gets the list of publishing plugins.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The list entries are colon-delimited strings, containing the pluginClassname, and the enabled/disabled status of that plugin.

For example:

      com.myorg.publisingplugin1.class:enabled
      com.myorg.publisingplugin2.class:disabled
      ...
 

Only classfiles currently residing in the well-known publishing plugin directory on the RDU server [location: BPR_HOME/rdu/classes] will appear in the list.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
             Batch batch = conn.newBatch();
       batch.getPublishingPlugins();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

See Also:
List

addUser

void addUser(String userId,
             String password,
             Map<String,Object> properties)
This method is used to create a new user in the database.

This method will fail if either the userId or password parameter is null or is an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the length of the password parameters is less than 8, (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the properties specified in the properties parameter are relevant properties for the specified user but the property value is null or data type is invalid. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the userId parameter already exists (error: CommandStatusCode.CMD_ERROR_USER_ALREADY_EXISTS)

This method will fail if the userId parameter specified is the admin user (error: CommandStatusCode.CMD_ERROR_USER_ADMIN)

This method will fail if the properties parameter is null or doesn't contain the user's role. (error: CommandStatusCode.CMD_ERROR_USER_ROLE_UNSPECIFIED)

Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus this method will fail when using clients older than 2.7, even when logged in as the admin user.

Parameters:
userId - String to identify the user to be added. This value is required and cannot be null.
password - String indicating the user password. This value is required and cannot be null.
properties - Map to identify the various user properties like user role, description and date when user was created. This parameter is required and cannot be null; and it must contain the user's role.

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String userId = "john";
       String password = "testpassword";
       Map prop = new HashMap();
       prop.put (UserDetailsKeys.USER_ISREADONLY, Boolean.TRUE);
       Batch batch = conn.newBatch();
       batch.addUser(userId,password,prop);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
UserDetailsKeys

deleteUser

void deleteUser(String userId)
Method to delete a user from database.

This method will fail if the userId parameter is null or if it is an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the user specified by the userId parameter does not exist (error: CommandStatusCode.CMD_ERROR_USER_UNKNOWN)

This method will fail if the user specified by the userId parameter is the admin user (error: CommandStatusCode.CMD_ERROR_USER_ADMIN)

Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus this method will fail when using clients older than 2.7, even when logged in as the admin user.

Parameters:
userId - String uniquely identifying the userId to delete. This value is required and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String userId = "user1";
       Batch batch = conn.newBatch();
       batch.deleteUser(userId);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
UserDetailsKeys, Map

changeUser

void changeUser(String userId,
                String password,
                Map<String,Object> properties)
Method to modify user properties.

This method will fail if either the userId or password parameters is null or an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the length of the password parameters is less than 8, (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the properties parameter is not null and it contains keys that are not relevant to users or key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the user specified by the userId parameter does not exist (error: CommandStatusCode.CMD_ERROR_USER_UNKNOWN)

This method will fail if the user specified by the userId parameter is the admin user (error: CommandStatusCode.CMD_ERROR_USER_ADMIN)

Note: BACC 2.7 added the readonly user feature. All clients of versions older than 2.7 are treated as readwrite users, including the admin user. Thus when chaning other user's data, this method will fail when using clients older than 2.7, even when logged in as the admin user.

Parameters:
userId - String uniquely identifying the user. This value is required and cannot be null.
password - the new password of the user. Calling this method chagnes the password. If the password should not be changed, enter the current password. This value is required and cannot be null.
properties - Map identifying the various properties that can be modified.

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String userId = "user1";
       String password = "password";
       Map prop = new HashMap();
       prop.put(UserDetailsKeys.USER_DESCRIPTION, "User1 description");
       Batch batch = conn.newBatch();
       batch.changeUser(userId,password, prop);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
UserDetailsKeys, Map

getAllUsers

void getAllUsers()
Method to get all users present in the system.

The administrator will be listed as one of the users. However, this user cannot be modified or deleted.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of String that is the users exist in the database. If there is no user exists in the database, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.getAllUsers();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 

See Also:
UserDetailsKeys, CommandStatusCode, CommandStatus, List

getUserDetails

void getUserDetails(String userId)
Retrieve the details for a given User.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain properties and values for the specified user.

This method will fail if the userId parameter is null or is an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the user specified by the userId parameter does not exist (error: CommandStatusCode.CMD_ERROR_USER_UNKNOWN)

Parameters:
userId - The userId whose details are required.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String userId = "user1";
       Batch batch = conn.newBatch();
       batch.getUserDetails(userId);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
UserDetailsKeys, Map

getPublishingPluginSettings

void getPublishingPluginSettings(String plugin_name)
Retrieve the publishing defaults for a given publishing plugin.

Call ((Map)CommandStatus.getData()) on the return from this method to retrieve the data. The map will contain properties and values for the specified publishing plugin.

This method will fail if the plugin_name parameter is null or is an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified plugin was not found (error: CommandStatusCode.CMD_ERROR_PLUGIN_UNKNOWN)

Parameters:
plugin_name - The plugin_name to retrieve the defaults for. This value is required and cannot be null.

Events fired: None

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       String plugin_name = "LDAPPublisher";
       Batch batch = conn.newBatch();
       batch.getPublishingPluginSettings(plugin_name);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
PublishDetailsKeys

changePublishingPluginSettings

void changePublishingPluginSettings(String plugin_name,
                                    Map<String,Object> properties,
                                    List<String> propertyRemoves)
Changes the publishing plugin defaults.

This method will fail if the plugin_name parameter is null or is an empty string (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the properties parameter is not null and it contains keys that are not relevant to publishing plugins or the key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified plugin was not found (error: CommandStatusCode.CMD_ERROR_PLUGIN_UNKNOWN)

Parameters:
plugin_name - The plugin_name to retrieve the defaults for. This value is required and cannot be null.
properties - The map of publishing plugin properties to add/change. If a property already exists, the old value will be replaced with the new value. If no properties are being added/modified, pass null.
propertyRemoves - The list of publishing plugin properties to remove. If no properties are being removed, pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:

       String plugin_name = new String("LDAPPublisher");
       List removes = new ArrayList();
       Map map = new HashMap();
       map.put(PublishDetailsKeys.PUBLISH_USERID, "userid");
       map.put(PublishDetailsKeys.PUBLISH_USERPASSWORD, "password");
       map.put(PublishDetailsKeys.PUBLISH_SERVER, "server");
       map.put(PublishDetailsKeys.PUBLISH_PORT, new Integer(2001));
       map.put(PublishDetailsKeys.PUBLISH_IPADDRESS, "1.2.2.4");

             Batch batch = conn.newBatch();
       batch.changePublishingPluginSettings(plugin_name, map, removes);
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...
 
See Also:
PublishDetailsKeys

deleteProvisioningGroup

void deleteProvisioningGroup(String provGroupName)
Delete the specified provisioning group from BPR.

This method will fail if the provGroup parameter is null or contains only whitespace (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified provisioning group is unknown (error: CommandStatusCode.CMD_ERROR_PROV_GROUP_UNKNOWN)

This method will fail of the specified provisioning group is in use by any DPEs (primary or secondary provisioning groups) or by a Network Registrar extension point or if there are any devices that are in the specified provisioning group (error: CommandStatusCode.CMD_ERROR_PROV_GROUP_HAS_RELATED_ENTITIES)

Parameters:
provGroupName - Name of the provisioning group to delete. The value is required and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
      ...
      Batch batch = conn.newBatch();
      batch.deleteProvisioningGroup("dallas-prov-group");
      status = batch.post();
      if ( status.isError() )
      {
          //process error
      }
      ...
 
See Also:
CommandStatusCode, CommandStatus

getAllFileTypes

void getAllFileTypes()
Retrieves a List of the pre-defined FileType objects in the database.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The list will consist FileType objects in the database. If there is no FileType exists in the database, an empty List will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
      Batch batch = conn.newBatch();
      batch.getAllFileTypes();

      BatchStatus status = batch.post();
      if ( status.isError() )
      {
          fail(status);
      }
      else
      {
          pass(status);
      }
       ...
 

See Also:
CommandStatusCode, CommandStatus, List

getAllLicenseInfo

void getAllLicenseInfo()
Gets a Map of objects listing the enabled technologies and the enabled licensable functions for the system deployment.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will contain a Map of enabled technlogies based on all the licenses which have been added to the system. If there is no lincense exists in the database, an empty List will be returned.

License key Maps will contain the following data:

 /enabledTechnologiesList ArrayList
 

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
       Batch batch = conn.newBatch();
       batch.getAllLicenseInfo();
       BatchStatus status = batch.post();
       if ( status.isError() )
       {
           //Process batch error
       }
       ...

 

See Also:
CommandStatusCode, CommandStatus, List, Map

getFileBytes

void getFileBytes(String name)
Gets the bytes of a file from the system.

Call ((byte[])CommandStatus.getData()) on the return from this method to retrieve the byte array that is the contents of the desired file.

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name does not exits in the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

Parameters:
name - A name that uniquely identifies the file to get. This value must be specified and cannot be null.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch = conn.newBatch();
  batch.getFileBytes("gold.cm");

  BatchStatus bstat = null;
  bstat = batch.post();
  if ( bstat.isError() )
  {
      //Process batch error
  }
  else
  {
      CommandStatus cstat = bstat.getCommandStatus(0);
      byte[] bytes = (byte[])cstat.getData();

      //save the contents of the byte array into a file : 
String pathnamestring = "/tmp/destFilename.cm"; File f = new File(pathnamestring); FileOutputStream fos = null; try { fos = new FileOutputStream(f); fos.write( bytes ); fos.close(); } catch (IOException ex) { // Do exception processing here } } ...
See Also:
CommandStatusCode, CommandStatus

getFileProperties

void getFileProperties(String name)
Gets the properties of a file from the system.

Call ((byte[])CommandStatus.getData()) on the return from this method to retrieve the Map that contains properties of the desired file.

This method will fail if the name parameter is null or contains only whitespace characters, or if the specified file name contains invalid characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if a file with the specified name does not exits in the system (error: CommandStatusCode.CMD_ERROR_FILE_UNKNOWN)

Parameters:
name - A name that uniquely identifies the file to get. This value must be specified and cannot be null.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch = conn.newBatch();
  batch.getFileProperties("gold.cm");

  BatchStatus bstat = null;
  bstat = batch.post();
  if ( bstat.isError() )
  {
      //Process batch error
  }
  {
      commandStatus = bstat.getCommandStatus(0);
      Map resultMap = (Map) commandStatus.getData();
      Iterator keys = resultMap.keySet().iterator();
      System.out.println("Properties for File");
      while (keys.hasNext())
      {
          String key = (String)keys.next();
          System.out.println(key +": " +resultMap.get(key));
      }
  }
  ...
 
See Also:
CommandStatusCode, CommandStatus

addDHCPCriteria

void addDHCPCriteria(String criteriaName,
                     String clientClass,
                     String includeSelectionTags,
                     String excludeSelectionTags,
                     Map<String,Object> properties)
Adds a DHCP Scope Selection Criteria to the database.

This method will fail if the criteriaName parameter is null, contains only whitespace characters, or it starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the clientClass, includeSelectionTags, and excludeSelectionTags parameters are all null (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the properties map is not null and contains keys that are not relevant to DHCP criteria or keys value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE) This method will fails if a dhcp criteria with the specified name already existis (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_EXISTS)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria. This value is required and cannot be null.
clientClass - The client class for Network Registrar to use to select an IP address for a modem or MTA. This value is required if both includeSelectionTags and excludeSelectionTags are null.
includeSelectionTags - A comma separated list of Network Registrar selection tags for Network Registrar to use to select an IP address for a modem or MTA. This value is required if both clientClass and excludeSelectionTags are null.
excludeSelectionTags - A comma separated list of Network Registrar selection tags for Network Registrar to use to select an IP address for a modem or MTA. This value is required if both clientClass and includeSelectionTags are null.
properties - A map of additional attributes for this DHCP Scope Selection Criteria. If not used, pass null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  Configuration prov;
  BatchStatus status;
  batch = conn.newBatch();
  batch.addDHCPCriteria("Provisioned","dhcpCriteria", "selTag1",
                        "selTag2",null);
  status = batch.post();
  if ( status.isError() )
  {
      // Process batch failure
  }
  ...
 
See Also:
CommandStatusCode, DHCPCriteriaDetailsKeys

deleteDHCPCriteria

void deleteDHCPCriteria(String criteriaName)
Deletes a DHCP Scope Selection Criteria.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

This method will fail if there are any devices using the specified DHCP criteria (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_RELATED_TO_IPDEVICE)

This method will fail if the specified DHCP criteria is the default DHCP criteria or CPE DHCP criteria for a technology (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria to delete. This value is required and cannot be null.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  Configuration prov;
  BatchStatus status;
  batch = conn.newBatch();
  batch.deleteDHCPCriteria("TestCriteria");
  status = batch.post();
  if ( status.isError() )
  {
      // Process batch error
  }
  ...
 
See Also:
CommandStatusCode, CommandStatus

changeDHCPCriteriaClientClass

void changeDHCPCriteriaClientClass(String criteriaName,
                                   String newClientClass)
Changes a DHCP Scope Selection Criteria's client class.

Note: This command, if successful, will contact the Configuration Regeneration Service and regenerate all the devices assigned the DHCP criteria that was changed with this command. The command will return immediately with BatchStatusCode.BATCH_WARNING. CRS will fire a CRSCompleteListener.CRS_COMPLETED event once it has completed regenerating the configuration for all devices with the changed DHCP criteria.

Note: Changes a DHCP Scope Selection Criteria's client class in a DHCP criteria once the DHCP Criteria was assigned to devices, in some cases, might cause the subsequent IP reservations in IPDevice.changeProperties(...) and/or IPDevice.changeMACAddress(...) to fail for all the devices with the changed DHCP criteria. Caution should be taken to make sure the new client class falls into the same DHCP scope as the previously assigned client class to avoid IP reservation failures.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the newClientClass parameter is not null and contains non-ASCII characters or whitespace characters (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

This method will fail if the newClientClass parameter is null and the include selection tags and exclude selection tags are also null (error: CommandStatusCode.CMD_ERROR_WRITE)

Parameters:
criteriaName - A string that uniquely identifies a DHCP Scope Selection Criteria. This value is required and cannot be null.
newClientClass - The new client class for the DHCP Criteria. This value is required if both include selection tags and exclude selection tags values are null. Otherwise this value is optional.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
      Batch batch = conn.newBatch();
      batch.changeDHCPCriteriaClientClass(
          "TestCriteria", "testClientClass");
      BatchStatus status = batch.post();
      if ( status.isError() )
      {
           //Process batch error
      }
       ...
 
See Also:
CommandStatusCode

changeDHCPCriteriaExcludeSelectionTags

void changeDHCPCriteriaExcludeSelectionTags(String criteriaName,
                                            String newExcludeSelectionTags)
Changes a DHCP Scope Selection Criteria's Exclude Selection Tags.

Note: This command, if successful, will contact the Configuration Regeneration Service and regenerate all the devices assigned the DHCP criteria that was changed with this command. The command will return immediately with BatchStatusCode.BATCH_WARNING. CRS will fire a CRSCompleteListener.CRS_COMPLETED event once it has completed regenerating the configuration for all devices with the changed DHCP criteria.

Note: The use of selection-criteria exclusion tags is not allowed when adding a IP reservation. Selection-criteria exclusion tags will not be considered during IP reservation.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the newExcludeSelectionTags parameter is not null and contains non-ASCII characters or whitespace characters (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

This method will fail if the newExcludeSelectionTags parameter is null and the include selection tags and client class parameters are also null (error: CommandStatusCode.CMD_ERROR_WRITE)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria. This value is required and cannot be null.
newExcludeSelectionTags - The new exclude selection tags for the DHCP Criteria. This parameter is required and must be specified if both client class and include selection tags are null. Otherwise, this value is optional.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
      Batch batch = conn.newBatch();
      batch.changeDHCPCriteriaExcludeSelectionTags(
          "TestCriteria", "testExcludeSelectionTag");
      BatchStatus status = batch.post();
      if ( status.isError() )
      {
           //Process batch error
      }
       ...
 
See Also:
CommandStatusCode

changeDHCPCriteriaIncludeSelectionTags

void changeDHCPCriteriaIncludeSelectionTags(String criteriaName,
                                            String newIncludeSelectionTags)
Changes a DHCP Scope Selection Criteria's Include Selection Tags.

Note: This command, if successful, will contact the Configuration Regeneration Service and regenerate all the devices assigned the DHCP criteria that was changed with this command. The command will return immediately with BatchStatusCode.BATCH_WARNING. CRS will fire a CRSCompleteListener.CRS_COMPLETED event once it has completed regenerating the configuration for all devices with the changed DHCP criteria.

Note: Changes a DHCP Scope Selection Criteria's Include Selection Tags in a DHCP criteria once the DHCP Criteria was assigned to devices, in some cases, might cause the subsequent IP reservations in IPDevice.changeProperties(...) and/or IPDevice.changeMACAddress(...) to fail for all the devices with the changed DHCP criteria. Caution should be taken to make sure the new Include Selection Tags falls into the same DHCP scope as the previously assigned Include Selection Tag to avoid IP reservation failures.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the newIncludeSelectionTags parameter is not null and contains non-ASCII characters or whitespace characters (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

This method will fail if the newIncludeSelectionTags parameter is null and the include selection tags and client class parameters are also null (error: CommandStatusCode.CMD_ERROR_WRITE)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria. This value is required and cannot be null.
newIncludeSelectionTags - The new include selection tags for the DHCP Criteria. This value is required if both client class and exclude selection tags are null. Otherwise it is an optional parameter.

Events fired:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
       ...
      Batch batch = conn.newBatch();
      batch.changeDHCPCriteriaIncludeSelectionTags(
          "TestCriteria", "testIncludeSelectionTag");
      BatchStatus status = batch.post();
      if ( status.isError() )
      {
           //Process batch error
      }
       ...
 
See Also:
CommandStatusCode

changeDHCPCriteriaProperties

void changeDHCPCriteriaProperties(String criteriaName,
                                  Map<String,Object> properties,
                                  List<String> propertyRemoves)
Changes a DHCP Scope Selection Criteria's properties.

Note: This command, if successful, will contact the Configuration Regeneration Service and regenerate all the devices assigned the DHCP criteria that was changed with this command. The command will return immediately with BatchStatusCode.BATCH_WARNING. CRS will fire a CRSCompleteListener.CRS_COMPLETED event once it has completed regenerating the configuration for all devices with the changed DHCP criteria.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the properties map is not null and contains keys that are not relevant to DHCP criteria or key value is null or data type is invalid (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the property specified in the properties parameter also exist in propertyRemoves parameter. (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria. This value is required and cannot be null.
properties - A map of additional or changed attributes for this DHCP Scope Selection Criteria. If there are no properties to add or change, specify null.
propertyRemoves - A list of property names to remove from this DHCP Scope Selection Criteria. If there are no properties to remove, specify null.

Events fired:

Relevant Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch = conn.newBatch();
  Map propAdd = new HashMap();
  List propRemoves = null;
  // TEST_CUSTOM_PROP has to be added as a custom property before
  // making this call.
  propAdd.put("TEST_CUSTOM_PROP", "test");
  batch.changeDHCPCriteriaProperties("TestCriteria",
                                     propAdd,
                                     propRemoves);
  status = batch.post();
  if ( status.isError() )
  {
      //Process batch failure
  }
  ...
 
See Also:
CommandStatusCode

getDHCPCriteriaDetails

void getDHCPCriteriaDetails(String criteriaName)
Gets Details of a DHCP Scope Selection Criteria.

This method will fail if the criteriaName parameter is null or contains only whitespace characters (error: CommandStatusCode.CMD_ERROR_VALIDATE)

This method will fail if the criteriaName parameter starts with the TechnologyDefaultsKeys.DEFAULT_PREFIX value (error: CommandStatusCode.CMD_ERROR_ILLEGAL_PARAM_VALUE)

This method will fail if the specified DHCP criteria does not exist (error: CommandStatusCode.CMD_ERROR_DHCP_CRITERIA_UNKNOWN)

Parameters:
criteriaName - A string that uniquely identifies this DHCP Scope Selection Criteria. This value is required and cannot be null.

Returned Property Keys:

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
  ...
  Batch batch;
  BatchStatus status;
  batch = conn.newBatch();
  batch.getDHCPCriteriaDetails("TestCriteria");
  status = batch.post();
  if ( status.isError() )
  {
      // process error
  }
  ...
 
See Also:
Map, CommandStatusCode, DHCPCriteriaDetailsKeys, CommandStatus

getAllDHCPCriterias

void getAllDHCPCriterias()
Gets a list of all DHCP Scope Selection Criterias defined in the system.

Call ((List)CommandStatus.getData()) on the return from this method to retrieve the data. The List will consist of the String that are the names DHCP Scope Selection Criteria present in the system. If there is no DHCP Scope Selection Criteria present in the system, an empty list will be returned.

Returned Command Status codes:

Returned Data Type code:

Sample Usage:
          ...
          Batch batch;
          BatchStatus status;
          batch = conn.newBatch();
          batch.getAllDHCPCriterias();
          status = batch.post();
          if ( status.isError() )
          {
             // Process batch failure
          }
          ....

 

See Also:
CommandStatusCode