.setPit( ProtobufMessages.Trigger.PointInTimeTrigger.newBuilder()
.setNextFireTime( pinTrigger.hasNextFireTime().getTime() )
.build() )
.build();
} else if ( trigger instanceof CompositeMaxDurationTrigger ) {
CompositeMaxDurationTrigger cmdTrigger = (CompositeMaxDurationTrigger) trigger;
ProtobufMessages.Trigger.CompositeMaxDurationTrigger.Builder _cmdt = ProtobufMessages.Trigger.CompositeMaxDurationTrigger.newBuilder();
if ( cmdTrigger.getMaxDurationTimestamp() != null ) {
_cmdt.setMaxDurationTimestamp( cmdTrigger.getMaxDurationTimestamp().getTime() );
}
if ( cmdTrigger.getTimerCurrentDate() != null ) {
_cmdt.setTimerCurrentDate( cmdTrigger.getTimerCurrentDate().getTime() );
}
if ( cmdTrigger.getTimerTrigger() != null ) {
_cmdt.setTimerTrigger( writeTrigger(cmdTrigger.getTimerTrigger(), outCtx) );
}
return ProtobufMessages.Trigger.newBuilder()
.setType( ProtobufMessages.Trigger.TriggerType.COMPOSITE_MAX_DURATION )
.setCmdt( _cmdt.build() )
.build();