org.joinedworkz.common.info.ResourceOperationInfo.xtend 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.joinedworkz.core.model.CmnOperationParameter
import org.joinedworkz.core.model.CmnResourceOperation
import org.joinedworkz.core.model.CmnResource
import org.joinedworkz.core.model.Verb
@Accessors
class ResourceOperationInfo {
final String parentPath
final Verb verb;
final CmnResourceOperation operation
final CmnResource operationResource
final String idPrefix
String path;
CmnResource resource
List parentParameters
new (String parentPath, CmnResourceOperation operation,String idPrefix) {
this.parentPath = parentPath
this.operation = operation
this.operationResource = operation.container as CmnResource
this.verb = operation.verb;
this.idPrefix = idPrefix
}
def addParentPathParameters(List parameters) {
if (parameters !== null) {
if (parentParameters === null) {
parentParameters = newArrayList
}
parentParameters.addAll(parameters)
}
}
}