Package overit.geocall.servlet.gate
Class ConcreteGate
java.lang.Object
overit.geocall.servlet.gate.Gate
overit.geocall.servlet.gate.ConcreteGate
- All Implemented Interfaces:
Serializable
This class extends
Gate and its used to perform a file download from a Source.
Here an example on how to use it:
String sourceName = "data.txt";
MyPersonalizedSource source = new MyPersonalizedSource());
ConcreteGate gate = new ConcreteGate(source, sourceName, new BrowserPolicy(60, true));
getWindow().getGateKeeper().openWeak(sourceName, gate);
getWM().openWindow(gate);
Where the source is a custom class that implements Source.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ByteCacheprotected Stringprotected Sourceprotected StringFields inherited from class overit.geocall.servlet.gate.Gate
_browserPolicy, _disposition, _fileName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif autoChace is enabled,falseotherwisegetName()Returns the nameReturns theSourcegetUID()Returns the UIDgetUrl()Returns the URLvoidoutput(OutputStream os, boolean compressed) Write in the OutputStreamvoidsetAutoCache(boolean autoCache) Sets if the autoChace capability should be enabledvoidSets the UIDMethods inherited from class overit.geocall.servlet.gate.Gate
download, getBrowserPolicy, getContentDisposition, getDispositon, getFileName, getFileName, setDisposition, toGetParams, upload
-
Field Details
-
_name
-
_source
-
_uid
-
_gateKeeperCoords
-
_autoCache
protected boolean _autoCache -
_cache
-
-
Constructor Details
-
ConcreteGate
- Parameters:
source- The SourcefileName- String containing the name of the file that should be downloaded. If present the managing type is "download", if is null the resource is inline (nested inside the page).browserPolicy- The BrowserPolicy
-
-
Method Details
-
getUID
Returns the UID- Returns:
- The UID
-
setUID
Sets the UID- Parameters:
uid- The UID
-
setAutoCache
public void setAutoCache(boolean autoCache) Sets if the autoChace capability should be enabled- Parameters:
autoCache- Boolean value indicating if the autoChace capability should be enabled
-
getAutoCache
public boolean getAutoCache()Returnstrueif autoChace is enabled,falseotherwise- Returns:
trueif autoChace is enabled,falseotherwise
-
getName
Returns the name- Returns:
- The name
-
getSource
Description copied from class:GateReturns theSource -
getUrl
Description copied from class:GateReturns the URL -
output
Description copied from class:GateWrite in the OutputStream- Overrides:
outputin classGate- Parameters:
os- The OutputStreamcompressed- Boolean value indicating if is compressed- Throws:
IOException- If an I/O error occurs
-