|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.sconman.rep.FSBasicRepository net.sourceforge.sconman.rep.FSQuotedRepository
public class FSQuotedRepository
This is a file repostitory that have quoted implemented. This repository is defined by the size and threshold
Nested Class Summary | |
---|---|
(package private) class |
FSQuotedRepository.QuotaCalculator
|
Nested classes/interfaces inherited from interface net.sourceforge.sconman.IRepository |
---|
IRepository.IVisitor |
Field Summary | |
---|---|
static int |
STORE_QUOTA_EXCEED
Store code result : Quota excceed |
Fields inherited from class net.sourceforge.sconman.rep.FSBasicRepository |
---|
category, rootPath |
Fields inherited from interface net.sourceforge.sconman.IRepository |
---|
STORE_OK |
Constructor Summary | |
---|---|
FSQuotedRepository()
|
|
FSQuotedRepository(java.lang.String rootPath,
long size)
Creates a new repository |
|
FSQuotedRepository(java.lang.String rootPath,
long size,
long threshold)
Creates a new repository |
Method Summary | |
---|---|
void |
deserializeXML(org.kxml2.io.KXmlParser in)
Deserialize from XML |
long |
getSize()
Gets the size of the repository |
long |
getThreshold()
Gets the threshold |
long |
getUsedSize()
Gets the used size of the repository |
void |
initialize()
Initialize the repository |
void |
remove(java.lang.String path)
Removes the stored file, given its path |
void |
serializeXML(org.kxml2.io.KXmlSerializer out)
Serialize to XML |
void |
setQuotaListesner(SCMQuotaListener listenerQuota)
Sets a quota listener |
void |
setSize(long newSize)
Resize the size of the repository |
void |
setThreshold(long newThreshold)
Resize the threshold of the repository |
int |
store(java.io.InputStream is,
java.lang.String path)
Store an InputStream in the repository |
Methods inherited from class net.sourceforge.sconman.rep.FSBasicRepository |
---|
add, addNonamed, exists, getCategory, getFile, getInputStream, getLastModified, getOutputStream, getRootPath, setCategory, setRootPath, size, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int STORE_QUOTA_EXCEED
Constructor Detail |
---|
public FSQuotedRepository()
public FSQuotedRepository(java.lang.String rootPath, long size) throws java.io.IOException
name
- Repository´s namerootPath
- The root path where the files are storedsize
- Quota of the repository in bytes.
java.io.IOException
public FSQuotedRepository(java.lang.String rootPath, long size, long threshold) throws java.io.IOException
name
- Repository´s name.rootPath
- The root path where the files are stored.size
- Quota of the repository in bytes.thresold
- Repository threshold in bytes.
java.io.IOException
Method Detail |
---|
public long getSize()
public long getThreshold()
public long getUsedSize()
public void setQuotaListesner(SCMQuotaListener listenerQuota)
listenerQuota
- Listenerpublic void setSize(long newSize)
newSize
- The new repository size in bytes.
java.io.IOException
- If can´t store the properties in the repositorypublic void setThreshold(long newThreshold)
newThreshold
- The new repository threshold in bytes.
java.io.IOException
- If can´t store the properties in the repositorypublic int store(java.io.InputStream is, java.lang.String path) throws java.io.IOException
IRepository
store
in interface IRepository
store
in class FSBasicRepository
is
- The InputStreampath
- The path to the file
java.io.IOException
public void remove(java.lang.String path) throws java.io.IOException
remove
in interface IRepository
remove
in class FSBasicRepository
path
-
java.io.IOException
public void initialize() throws java.io.IOException
IRepository
initialize
in interface IRepository
initialize
in class FSBasicRepository
java.io.IOException
public void serializeXML(org.kxml2.io.KXmlSerializer out) throws java.io.IOException
IXMLSerializable
serializeXML
in interface IXMLSerializable
serializeXML
in class FSBasicRepository
out
- The KXmlSerializer to do the output
java.io.IOException
- Thrown if there's an IO problempublic void deserializeXML(org.kxml2.io.KXmlParser in) throws org.xmlpull.v1.XmlPullParserException, java.io.IOException
IXMLSerializable
deserializeXML
in interface IXMLSerializable
deserializeXML
in class FSBasicRepository
in
- The KXml pull parser
org.xmlpull.v1.XmlPullParserException
- Thrown if there's an XML problem
java.io.IOException
- Thrown if there's an IO problem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |