All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.joinedworkz.common.info.ResourceOperationInfo Maven / Gradle / Ivy

package org.joinedworkz.common.info;

import java.util.List;
import org.eclipse.xtend.lib.annotations.Accessors;
import org.eclipse.xtext.xbase.lib.CollectionLiterals;
import org.eclipse.xtext.xbase.lib.Pure;
import org.joinedworkz.core.model.CmnObject;
import org.joinedworkz.core.model.CmnOperationParameter;
import org.joinedworkz.core.model.CmnResource;
import org.joinedworkz.core.model.CmnResourceOperation;
import org.joinedworkz.core.model.Verb;

@Accessors
@SuppressWarnings("all")
public class ResourceOperationInfo {
  private final String parentPath;

  private final Verb verb;

  private final CmnResourceOperation operation;

  private final CmnResource operationResource;

  private final String idPrefix;

  private String path;

  private CmnResource resource;

  private List parentParameters;

  public ResourceOperationInfo(final String parentPath, final CmnResourceOperation operation, final String idPrefix) {
    this.parentPath = parentPath;
    this.operation = operation;
    CmnObject _container = operation.getContainer();
    this.operationResource = ((CmnResource) _container);
    this.verb = operation.getVerb();
    this.idPrefix = idPrefix;
  }

  public boolean addParentPathParameters(final List parameters) {
    boolean _xifexpression = false;
    if ((parameters != null)) {
      boolean _xblockexpression = false;
      {
        if ((this.parentParameters == null)) {
          this.parentParameters = CollectionLiterals.newArrayList();
        }
        _xblockexpression = this.parentParameters.addAll(parameters);
      }
      _xifexpression = _xblockexpression;
    }
    return _xifexpression;
  }

  @Pure
  public String getParentPath() {
    return this.parentPath;
  }

  @Pure
  public Verb getVerb() {
    return this.verb;
  }

  @Pure
  public CmnResourceOperation getOperation() {
    return this.operation;
  }

  @Pure
  public CmnResource getOperationResource() {
    return this.operationResource;
  }

  @Pure
  public String getIdPrefix() {
    return this.idPrefix;
  }

  @Pure
  public String getPath() {
    return this.path;
  }

  public void setPath(final String path) {
    this.path = path;
  }

  @Pure
  public CmnResource getResource() {
    return this.resource;
  }

  public void setResource(final CmnResource resource) {
    this.resource = resource;
  }

  @Pure
  public List getParentParameters() {
    return this.parentParameters;
  }

  public void setParentParameters(final List parentParameters) {
    this.parentParameters = parentParameters;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy