To replace an existing macro with a new macro, use the following sis-console command, Ant task, or related MBean operations.

Console command

replacemacro

Command

replacemacro <ra-entity> <file>
    Replace a previously installed macro component with new content from a file
Warning This command installs in the SIS the macro XML file — which must be on the local filesystem of the management client.
Note If a macro with same identity as that denoted in the file does not exist, this command behaves the same as installmacro.

Example

To replace an existing macro with macro example-macro.xml from the local filesystem of the management client, into the SIS instance named sis:

$ ./sis-console replacemacro sis example-macro.xml
Replaced macro MacroID[name=Example,vendor=ABC,version=1.0] from file example-macro.xml

Ant task

replacemacro

Task

<replacemacro file="..."/>

Example

To replace an existing macro with macro example-macro.xml from the local filesystem of the management client:

<sis-in-management>
    <replacemacro file="example-macro.xml"/>
</sis-in-management>

or

<sis-sip-management>
    <replacemacro file="example-macro.xml"/>
</sis-sip-management>

MBean operations

MBean

replace

Operation

To replace a macro from a URL:

public MacroID replace(String url)
    throws NullPointerException, MalformedURLException,
           DeploymentException, ManagementException;
Warning The SIS retrieves the macro XML file using the specified URL — which must be resolvable from the Rhino node.

replace

Operation

To replace a macro from a byte array:

public MacroID replace(byte[] content)
    throws NullPointerException, DeploymentException, ManagementException;
Note The SIS reads the macro XML data from the specified byte array.
Previous page Next page
SIS Version 3.0.0