use of org.bimserver.models.store.PrimitiveDefinition in project BIMserver by opensourceBIM.
the class AbstractSerializerPlugin method getSettingsDefinition.
@Override
public ObjectDefinition getSettingsDefinition() {
ObjectDefinition objectDefinition = StoreFactory.eINSTANCE.createObjectDefinition();
ParameterDefinition extensionParameter = StoreFactory.eINSTANCE.createParameterDefinition();
extensionParameter.setIdentifier(EXTENSION);
extensionParameter.setName(EXTENSION);
extensionParameter.setDescription("Extension of the downloaded file");
PrimitiveDefinition stringType = StoreFactory.eINSTANCE.createPrimitiveDefinition();
stringType.setType(PrimitiveEnum.STRING);
extensionParameter.setType(stringType);
StringType defaultExtensionValue = StoreFactory.eINSTANCE.createStringType();
defaultExtensionValue.setValue(getDefaultExtension());
extensionParameter.setDefaultValue(defaultExtensionValue);
objectDefinition.getParameters().add(extensionParameter);
ParameterDefinition contentTypeParameter = StoreFactory.eINSTANCE.createParameterDefinition();
contentTypeParameter.setIdentifier(CONTENT_TYPE);
contentTypeParameter.setName(CONTENT_TYPE);
contentTypeParameter.setDescription("Content-Type in the HTTP header of the downloaded file");
contentTypeParameter.setType(stringType);
StringType defaultContentTypeValue = StoreFactory.eINSTANCE.createStringType();
defaultContentTypeValue.setValue(getDefaultContentType());
contentTypeParameter.setDefaultValue(defaultContentTypeValue);
objectDefinition.getParameters().add(contentTypeParameter);
return objectDefinition;
}
use of org.bimserver.models.store.PrimitiveDefinition in project BIMserver by opensourceBIM.
the class AbstractWebModulePlugin method getSettingsDefinition.
@Override
public ObjectDefinition getSettingsDefinition() {
ObjectDefinition objectDefinition = StoreFactory.eINSTANCE.createObjectDefinition();
PrimitiveDefinition stringDefinition = StoreFactory.eINSTANCE.createPrimitiveDefinition();
stringDefinition.setType(PrimitiveEnum.STRING);
ParameterDefinition contextPathParameter = StoreFactory.eINSTANCE.createParameterDefinition();
contextPathParameter.setIdentifier("contextPath");
contextPathParameter.setName("contextPath");
contextPathParameter.setDescription("Context Path to run this Web Module on");
StringType defaultValue = StoreFactory.eINSTANCE.createStringType();
defaultValue.setValue(getDefaultContextPath());
contextPathParameter.setDefaultValue(defaultValue);
contextPathParameter.setType(stringDefinition);
objectDefinition.getParameters().add(contextPathParameter);
return objectDefinition;
}
Aggregations