core/src/main/java/io/fabric8/maven/core/service/ApplyService.java
public boolean applyProjectRequest(ProjectRequest entity) {
        String namespace = getOrCreateMetadata(entity).getName();
        log.info("Using project: " + namespace);
        String name = getName(entity);
        Objects.requireNonNull(name, "No name for " + entity);
        OpenShiftClient openshiftClient = getOpenShiftClient();
        if (openshiftClient == null) {
            log.warn("Cannot check for Project " + namespace + " as not running against OpenShift!");
            return false;
        }
        boolean exists = checkNamespace(name);
        // We may want to be more fine-grained on the phase of the project
        if (!exists) {
            try {
                Object answer = openshiftClient.projectrequests().create(entity);
                logGeneratedEntity("Created ProjectRequest: ", namespace, entity, answer);
                return true;
            } catch (Exception e) {
                onApplyError("Failed to create ProjectRequest: " + name + " due " + e.getMessage(), e);
            }
        }
        return false;
    }
public boolean applyProjectRequest(ProjectRequest entity) {
        String namespace = getOrCreateMetadata(entity).getName();
        log.info("Using project: " + namespace);
        String name = getName(entity);
        Objects.requireNonNull(name, "No name for " + entity);
        OpenShiftClient openshiftClient = getOpenShiftClient();
        if (openshiftClient == null) {
            log.warn("Cannot check for Project " + namespace + " as not running against OpenShift!");
            return false;
        }
        boolean exists = checkNamespace(name);
        // We may want to be more fine-grained on the phase of the project
        if (!exists) {
            try {
                Object answer = openshiftClient.projectrequests().create(entity);
                logGeneratedEntity("Created ProjectRequest: ", namespace, entity, answer);
                return true;
            } catch (Exception e) {
                onApplyError("Failed to create ProjectRequest: " + name + " due " + e.getMessage(), e);
            }
        }
        return false;
    }
public boolean applyProjectRequest ( ProjectRequest entity ) { String namespace = getOrCreateMetadata ( entity ) . getName ( ) ; log . info ( "Using project: " + namespace ) ; String name = getName ( entity ) ; Objects . requireNonNull ( name , "No name for " + entity ) ; OpenShiftClient openshiftClient = getOpenShiftClient ( ) ; if ( openshiftClient == null ) { log . warn ( "Cannot check for Project " + namespace + " as not running against OpenShift!" ) ; return false ; } boolean exists = checkNamespace ( name ) ; // We may want to be more fine-grained on the phase of the project if ( ! exists ) { try { Object answer = openshiftClient . projectrequests ( ) . create ( entity ) ; logGeneratedEntity ( "Created ProjectRequest: " , namespace , entity , answer ) ; return true ; } catch ( Exception e ) { onApplyError ( "Failed to create ProjectRequest: " + name + " due " + e . getMessage ( ) , e ) ; } } return false ; }
Returns true if the ProjectRequest is created
Returns true if the ProjectRequest is created