service-registry/src/main/java/de/evoila/osb/service/registry/model/service/broker/SharedContext.java
public boolean validate() throws SharedContextInvalidException {
        if (shared) {
            if (serviceInstanceId == null) throw new SharedContextInvalidException("serviceInstanceId", SharedContextInvalidException.FIELD_IS_NULL);
            if (serviceDefinitionId == null) throw new SharedContextInvalidException("serviceDefinitionId", SharedContextInvalidException.FIELD_IS_NULL);
            if (planId == null) throw new SharedContextInvalidException("planId", SharedContextInvalidException.FIELD_IS_NULL);
            if (serviceInstances == null) throw new SharedContextInvalidException("serviceInstances", SharedContextInvalidException.FIELD_IS_NULL);

            if (serviceInstanceId.isEmpty()) throw new SharedContextInvalidException("serviceInstanceId", SharedContextInvalidException.FIELD_IS_EMPTY);
            if (serviceDefinitionId.isEmpty()) throw new SharedContextInvalidException("serviceDefinitionId", SharedContextInvalidException.FIELD_IS_EMPTY);
            if (planId.isEmpty()) throw new SharedContextInvalidException("planId", SharedContextInvalidException.FIELD_IS_EMPTY);
        }
        return true;
    }
/**
     * Validates the fields of the SharedContext for proper usage.
     * Checks for null pointers and empty fields, if shared is true.
     * @return true if SharedContext is valid in its current state and will never return false!
     * @throws SharedContextInvalidException if this object is invalid in its current state
     */
Validates the fields of the SharedContext for proper usage.
Checks for null pointers and empty fields, if shared is true.
@return true if SharedContext is valid in its current state and will never return false.
@throws SharedContextInvalidException if this object is invalid in its current state
Validates the fields of the SharedContext for proper usage . Checks for null pointers and empty fields if shared is true . @return true if SharedContext is valid in its current state and will never return false . @throws SharedContextInvalidException if this object is invalid in its current state
public boolean validate() throws SharedContextInvalidException {
        if (shared) {
            if (serviceInstanceId == null) throw new SharedContextInvalidException("serviceInstanceId", SharedContextInvalidException.FIELD_IS_NULL);
            if (serviceDefinitionId == null) throw new SharedContextInvalidException("serviceDefinitionId", SharedContextInvalidException.FIELD_IS_NULL);
            if (planId == null) throw new SharedContextInvalidException("planId", SharedContextInvalidException.FIELD_IS_NULL);
            if (serviceInstances == null) throw new SharedContextInvalidException("serviceInstances", SharedContextInvalidException.FIELD_IS_NULL);
            if (serviceInstanceId.isEmpty()) throw new SharedContextInvalidException("serviceInstanceId", SharedContextInvalidException.FIELD_IS_EMPTY);
            if (serviceDefinitionId.isEmpty()) throw new SharedContextInvalidException("serviceDefinitionId", SharedContextInvalidException.FIELD_IS_EMPTY);
            if (planId.isEmpty()) throw new SharedContextInvalidException("planId", SharedContextInvalidException.FIELD_IS_EMPTY);
        }
        return true;
    }
public boolean validate ( ) throws SharedContextInvalidException { if ( shared ) { if ( serviceInstanceId == null ) throw new SharedContextInvalidException ( "serviceInstanceId" , SharedContextInvalidException . FIELD_IS_NULL ) ; if ( serviceDefinitionId == null ) throw new SharedContextInvalidException ( "serviceDefinitionId" , SharedContextInvalidException . FIELD_IS_NULL ) ; if ( planId == null ) throw new SharedContextInvalidException ( "planId" , SharedContextInvalidException . FIELD_IS_NULL ) ; if ( serviceInstances == null ) throw new SharedContextInvalidException ( "serviceInstances" , SharedContextInvalidException . FIELD_IS_NULL ) ; if ( serviceInstanceId . isEmpty ( ) ) throw new SharedContextInvalidException ( "serviceInstanceId" , SharedContextInvalidException . FIELD_IS_EMPTY ) ; if ( serviceDefinitionId . isEmpty ( ) ) throw new SharedContextInvalidException ( "serviceDefinitionId" , SharedContextInvalidException . FIELD_IS_EMPTY ) ; if ( planId . isEmpty ( ) ) throw new SharedContextInvalidException ( "planId" , SharedContextInvalidException . FIELD_IS_EMPTY ) ; } return true ; }
Validates the fields of the SharedContext for proper usage.
Validates the fields of the SharedContext for proper usage .