org.joinedworkz.common.info.ResourceOperationInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-base Show documentation
Show all versions of common-base Show documentation
DSL based modeling framework - facilities common base
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.CmnProvidedResource;
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 CmnProvidedResource providedResource;
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 CmnProvidedResource getProvidedResource() {
return this.providedResource;
}
public void setProvidedResource(final CmnProvidedResource providedResource) {
this.providedResource = providedResource;
}
@Pure
public List getParentParameters() {
return this.parentParameters;
}
public void setParentParameters(final List parentParameters) {
this.parentParameters = parentParameters;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy