P - the type of the macro parameters bean@Unstable public abstract class AbstractSignableMacro<P> extends org.xwiki.rendering.macro.AbstractMacro<P> implements SignableMacro
AbstractMacro to ease the support of signatures.| Constructor and Description |
|---|
AbstractSignableMacro(String name)
Creates a new
Macro instance. |
AbstractSignableMacro(String name,
String description)
Creates a new
Macro instance. |
AbstractSignableMacro(String name,
String description,
Class<?> parametersBeanClass)
Creates a new
Macro instance. |
AbstractSignableMacro(String name,
String description,
org.xwiki.rendering.macro.descriptor.ContentDescriptor contentDescriptor)
Creates a new
Macro instance. |
AbstractSignableMacro(String name,
String description,
org.xwiki.rendering.macro.descriptor.ContentDescriptor contentDescriptor,
Class<?> parametersBeanClass)
Creates a new
Macro instance. |
| Modifier and Type | Method and Description |
|---|---|
protected org.xwiki.component.manager.ComponentManager |
getComponentManager() |
void |
sign(org.xwiki.rendering.block.Block block,
org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters parameters)
Sign the given macro block.
|
org.xwiki.crypto.signer.param.CMSSignedDataVerified |
verify(org.xwiki.rendering.block.Block block,
org.xwiki.crypto.pkix.CertificateProvider certificateProvider)
Verify signature of the given macro block.
|
compareTo, getDescriptor, getPriority, initialize, setDefaultCategory, setDescriptor, setPrioritypublic AbstractSignableMacro(String name)
Macro instance.
5005name - the name of the macro (eg "Table Of Contents" for the TOC macro)public AbstractSignableMacro(String name, String description)
Macro instance.name - the name of the macro (eg "Table Of Contents" for the TOC macro)description - a string describing this macro.public AbstractSignableMacro(String name, String description, org.xwiki.rendering.macro.descriptor.ContentDescriptor contentDescriptor)
Macro instance.name - the name of the macro (eg "Table Of Contents" for the TOC macro)description - a string describing this macro.contentDescriptor - ContentDescriptor for this macro.public AbstractSignableMacro(String name, String description, Class<?> parametersBeanClass)
Macro instance.name - the name of the macro (eg "Table Of Contents" for the TOC macro)description - a string describing this macro.parametersBeanClass - class of the parameters bean of this macro.public AbstractSignableMacro(String name, String description, org.xwiki.rendering.macro.descriptor.ContentDescriptor contentDescriptor, Class<?> parametersBeanClass)
Macro instance.name - the name of the macro (eg "Table Of Contents" for the TOC macro)description - string describing this macro.contentDescriptor - the ContentDescriptor describing the content of this macro.parametersBeanClass - class of the parameters bean.protected org.xwiki.component.manager.ComponentManager getComponentManager()
public void sign(org.xwiki.rendering.block.Block block,
org.xwiki.crypto.signer.param.CMSSignedDataGeneratorParameters parameters)
throws MacroSignatureException
SignableMacrosign in interface SignableMacroblock - the block to sign. This block should have a known content source and could be either
a MacroBlock or
a MacroMarkerBlock.parameters - the signature generation parameters.MacroSignatureException - on error.public org.xwiki.crypto.signer.param.CMSSignedDataVerified verify(org.xwiki.rendering.block.Block block,
org.xwiki.crypto.pkix.CertificateProvider certificateProvider)
throws MacroSignatureException
SignableMacroverify in interface SignableMacroblock - the block to verify. This block should have a known content source and could be either
a MacroBlock or
a MacroMarkerBlock.certificateProvider - a certificate provider providing available certificates.MacroSignatureException - on error.Copyright © 2004–2015 XWiki. All rights reserved.