public class WResource extends Object
Modifier and Type | Class and Description |
---|---|
static class |
WResource.WFileResource
A resource representing a file.
|
Constructor and Description |
---|
WResource() |
Modifier and Type | Method and Description |
---|---|
static com.vaadin.server.Resource |
convert(RecordHolder resource,
boolean forceSave)
Converts an LSPS resource to a Vaadin resource representation.
|
static RecordHolder |
convert(com.vaadin.server.Resource resource,
Namespace namespace)
Converts a Vaadin representation of a resource to an LSPS resource.
|
static com.vaadin.server.Resource |
convert(Variant.RecordVariant resource,
boolean forceSave)
Converts the resource to a Vaadin resource.
|
public static com.vaadin.server.Resource convert(RecordHolder resource, boolean forceSave)
resource
- the LSPS resource to convertforceSave
- true
if the resource should be downloaded by the
browser instead of shown.public static com.vaadin.server.Resource convert(Variant.RecordVariant resource, boolean forceSave)
resource
- the uicommon::Resource record.forceSave
- if true, this is a download link. If false, the contents is going to be simply displayed, e.g. by the WImage componentpublic static RecordHolder convert(com.vaadin.server.Resource resource, Namespace namespace)
resource
- the resource to convertnamespace
- the namespace which will be used to create resources of type
extending uicommon::Resource
. The namespace must be able
to create the resource records otherwise this method fails with a
RuntimeException
.Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.