Search in sources :

Example 1 with PrimitiveDefinition

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;
}
Also used : StringType(org.bimserver.models.store.StringType) ObjectDefinition(org.bimserver.models.store.ObjectDefinition) PrimitiveDefinition(org.bimserver.models.store.PrimitiveDefinition) ParameterDefinition(org.bimserver.models.store.ParameterDefinition)

Example 2 with PrimitiveDefinition

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;
}
Also used : StringType(org.bimserver.models.store.StringType) ObjectDefinition(org.bimserver.models.store.ObjectDefinition) PrimitiveDefinition(org.bimserver.models.store.PrimitiveDefinition) ParameterDefinition(org.bimserver.models.store.ParameterDefinition)

Aggregations

ObjectDefinition (org.bimserver.models.store.ObjectDefinition)2 ParameterDefinition (org.bimserver.models.store.ParameterDefinition)2 PrimitiveDefinition (org.bimserver.models.store.PrimitiveDefinition)2 StringType (org.bimserver.models.store.StringType)2