Cisco Systems, Inc.

com.pcube.apps.engage.policy
Class DssImporter

java.lang.Object
  extended by com.pcube.apps.engage.policy.DssImporter

public class DssImporter
extends java.lang.Object

This is a control class for importing dss to policy

Author:
rafis

Constructor Summary
DssImporter(Policy policy)
           
 
Method Summary
 java.util.List canAttachDss(DynamicSignaturesScript newDss)
           
static java.io.File getDefaultDssFile()
           
 org.eclipse.emf.common.util.Diagnostic getDiagnostic()
          The diagnostic created with the last import call.
 java.util.List getEnhancedProtocols()
          improved (signatures were added) with the attachment of the dss.
 java.util.List getNewProtocols()
          compute the list of protocols the policy attached dss contributed to the policy.
 void importDynamicSignatureScript(DynamicSignaturesScript script)
          imports a dss with forceRemove = false
 void importDynamicSignatureScript(DynamicSignaturesScript newDss, boolean forceRemoval)
          Importing a script will also create the new protocols the script signatures identify.
 void importDynamicSignatureScript(java.io.File file)
          Importing a script will also create the new protocols the script signatures identify.
 void importDynamicSignatureScript(java.io.File file, boolean forceRemoval)
          Importing a script will also create the new protocols the script signatures identify.
static boolean isDefaultDssAttached(Policy policy)
           
static boolean isDssEngageCompatible(DynamicSignaturesScript dss)
           
 boolean isDssProtocolsUsedInServices()
          check if the protocols created by the policy attached dss have services
 void removeDynamicSignatureScript(boolean forceRemoval)
          remove the current script.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DssImporter

public DssImporter(Policy policy)
Method Detail

removeDynamicSignatureScript

public void removeDynamicSignatureScript(boolean forceRemoval)
                                  throws PolicyInconsistencyException,
                                         ImportExportException
remove the current script. this method will also delete any protcol the script defined.

Throws:
PolicyInconsistencyException
ImportExportException

importDynamicSignatureScript

public void importDynamicSignatureScript(DynamicSignaturesScript script)
                                  throws ImportExportException,
                                         PolicyInconsistencyException
imports a dss with forceRemove = false

Parameters:
script -
Throws:
PolicyInconsistencyException
ImportExportException

importDynamicSignatureScript

public void importDynamicSignatureScript(java.io.File file)
                                  throws ImportExportException,
                                         java.io.FileNotFoundException,
                                         java.io.IOException,
                                         PolicyInconsistencyException
Importing a script will also create the new protocols the script signatures identify. The policy support only a single dss therefore setting a new script removes configurations created by the setting of the older one.

Parameters:
dss - file
Throws:
java.io.IOException
java.io.FileNotFoundException
PolicyInconsistencyException
PolicyInconsistencyException
ImportExportException

importDynamicSignatureScript

public void importDynamicSignatureScript(java.io.File file,
                                         boolean forceRemoval)
                                  throws ImportExportException,
                                         java.io.FileNotFoundException,
                                         java.io.IOException,
                                         PolicyInconsistencyException
Importing a script will also create the new protocols the script signatures identify. The policy support only a single dss therefore setting a new script removes configurations created by the setting of the older one.

Parameters:
dss - file
Throws:
java.io.IOException
java.io.FileNotFoundException
PolicyInconsistencyException
PolicyInconsistencyException
ImportExportException

importDynamicSignatureScript

public void importDynamicSignatureScript(DynamicSignaturesScript newDss,
                                         boolean forceRemoval)
                                  throws ImportExportException,
                                         PolicyInconsistencyException
Importing a script will also create the new protocols the script signatures identify. The policy support only a single dss therefore setting a new script removes configurations created by the setting of the older one.

Parameters:
newDss -
Throws:
ImportExportException
PolicyInconsistencyException
PolicyInconsistencyException

canAttachDss

public java.util.List canAttachDss(DynamicSignaturesScript newDss)

isDssEngageCompatible

public static boolean isDssEngageCompatible(DynamicSignaturesScript dss)
Parameters:
dss -
Returns:
true if the specified dss is compatible with latest version

getNewProtocols

public java.util.List getNewProtocols()
compute the list of protocols the policy attached dss contributed to the policy.

Parameters:
script -
Returns:

getEnhancedProtocols

public java.util.List getEnhancedProtocols()
improved (signatures were added) with the attachment of the dss. the policy if it was imported.

Parameters:
script -
Returns:

isDssProtocolsUsedInServices

public boolean isDssProtocolsUsedInServices()
check if the protocols created by the policy attached dss have services

Returns:

getDefaultDssFile

public static java.io.File getDefaultDssFile()

isDefaultDssAttached

public static boolean isDefaultDssAttached(Policy policy)
                                    throws ImportExportException
Parameters:
policy -
Returns:
true if the default dss has been imported to the specified policy
Throws:
ImportExportException - - on dss parsing failure

getDiagnostic

public org.eclipse.emf.common.util.Diagnostic getDiagnostic()
The diagnostic created with the last import call. Check the diagnostic if import fails.

Returns:
Returns the diagnostic.

Cisco Systems, Inc.

Copyright © 2013 Cisco Systems, Inc. Confidential.