public class HistoryGenerator extends ServiceableGenerator
Generator
for exposing content history and content versions.Modifier and Type | Class and Description |
---|---|
private static class |
HistoryGenerator.VersionInformation |
Modifier and Type | Field and Description |
---|---|
private static I18nizableText |
__MESSAGE_NO_ACTION |
private static I18nizableText |
__MESSAGE_NO_STEP |
private Map<UserIdentity,String> |
_identityToFullNameCache |
private AmetysObjectResolver |
_resolver |
private UserManager |
_userManager |
private WorkflowProvider |
_workflowProvider |
manager
objectModel, parameters, resolver, source
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
Constructor and Description |
---|
HistoryGenerator() |
Modifier and Type | Method and Description |
---|---|
private List<HistoryGenerator.VersionInformation> |
_computeVersionsBetween(List<HistoryGenerator.VersionInformation> versionsInformation,
Date startDate,
Date finishDate) |
private long |
_getInitialActionId(WorkflowProvider.AmetysObjectWorkflow workflow,
WorkflowAwareContent waContent) |
private String |
_resolveFullName(UserIdentity userIdentity) |
private List<HistoryGenerator.VersionInformation> |
_resolveVersionInformations(VersionAwareAmetysObject content) |
private void |
_saxAction(int actionId,
com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) |
private void |
_saxCaller(UserIdentity caller) |
private void |
_saxComments(com.opensymphony.workflow.spi.Step previousStep) |
private void |
_saxContentWorkflowHistory(Content content,
List<HistoryGenerator.VersionInformation> versionsInformation) |
private void |
_saxStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
List<HistoryGenerator.VersionInformation> versionsInformation,
com.opensymphony.workflow.spi.Step step,
com.opensymphony.workflow.spi.Step previousStep) |
private void |
_saxStepDescription(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor,
int stepId) |
private void |
_saxValidation(com.opensymphony.workflow.spi.Step step,
Date startDate,
Date finishDate,
Date actionStartDate,
Date actionFinishDate) |
private void |
_saxVersionInformation(List<HistoryGenerator.VersionInformation> versionsInformation) |
void |
generate() |
void |
recycle() |
void |
service(ServiceManager serviceManager) |
dispose
setup
setConsumer, setContentHandler, setLexicalHandler
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setConsumer
private static final I18nizableText __MESSAGE_NO_STEP
private static final I18nizableText __MESSAGE_NO_ACTION
private Map<UserIdentity,String> _identityToFullNameCache
private WorkflowProvider _workflowProvider
private UserManager _userManager
private AmetysObjectResolver _resolver
public HistoryGenerator()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
service
in class ServiceableGenerator
ServiceException
public void generate() throws IOException, SAXException, ProcessingException
private List<HistoryGenerator.VersionInformation> _resolveVersionInformations(VersionAwareAmetysObject content) throws RepositoryException
RepositoryException
private void _saxVersionInformation(List<HistoryGenerator.VersionInformation> versionsInformation) throws SAXException, RepositoryException
SAXException
RepositoryException
private void _saxContentWorkflowHistory(Content content, List<HistoryGenerator.VersionInformation> versionsInformation) throws SAXException, ProcessingException, RepositoryException
private long _getInitialActionId(WorkflowProvider.AmetysObjectWorkflow workflow, WorkflowAwareContent waContent)
private void _saxStep(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, List<HistoryGenerator.VersionInformation> versionsInformation, com.opensymphony.workflow.spi.Step step, com.opensymphony.workflow.spi.Step previousStep) throws SAXException, RepositoryException
SAXException
RepositoryException
private void _saxStepDescription(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId) throws SAXException
SAXException
private void _saxCaller(UserIdentity caller) throws SAXException
SAXException
private void _saxAction(int actionId, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) throws SAXException
SAXException
private void _saxComments(com.opensymphony.workflow.spi.Step previousStep) throws SAXException
SAXException
private void _saxValidation(com.opensymphony.workflow.spi.Step step, Date startDate, Date finishDate, Date actionStartDate, Date actionFinishDate) throws SAXException
SAXException
private List<HistoryGenerator.VersionInformation> _computeVersionsBetween(List<HistoryGenerator.VersionInformation> versionsInformation, Date startDate, Date finishDate) throws RepositoryException
RepositoryException
private String _resolveFullName(UserIdentity userIdentity)
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractGenerator