demand = registerPublisherRequest.isDemand() != null
? registerPublisherRequest.isDemand().booleanValue()
: false;
// Check all parameters
if (publisherReference == null) {
PublisherRegistrationFailedFaultType fault = new PublisherRegistrationFailedFaultType();
throw new PublisherRegistrationFailedFault("Invalid PublisherReference: null", fault);
}
if (demand && (topic == null || topic.size() == 0)) {
InvalidTopicExpressionFaultType fault = new InvalidTopicExpressionFaultType();
throw new InvalidTopicExpressionFault(