Made javadoc review.

This commit is contained in:
Christian P. MOMON 2024-08-23 12:17:29 +02:00
parent 5aaf1bf9f4
commit 4018f2cc15
6 changed files with 84 additions and 40 deletions

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2013-2017 Christian Pierre MOMON <christian.momon@devinsy.fr> * Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -20,8 +20,6 @@ package fr.devinsy.sikevadb.core;
/** /**
* The Interface Archiver. * The Interface Archiver.
*
* @author Christian Pierre MOMON
*/ */
public interface Archiver public interface Archiver
{ {
@ -31,17 +29,50 @@ public interface Archiver
SUSPENDED SUSPENDED
} }
/**
* Activate.
*/
void activate(); void activate();
/**
* Archive.
*
* @param element
* the element
* @throws SikevaDBException
* the sikeva DB exception
*/
void archive(Element element) throws SikevaDBException; void archive(Element element) throws SikevaDBException;
/**
* Clear.
*
* @throws SikevaDBException
* the sikeva DB exception
*/
void clear() throws SikevaDBException; void clear() throws SikevaDBException;
/**
* Close.
*/
void close(); void close();
/**
* Checks if is activated.
*
* @return true, if is activated
*/
boolean isActivated(); boolean isActivated();
/**
* Checks if is suspended.
*
* @return true, if is suspended
*/
boolean isSuspended(); boolean isSuspended();
/**
* Suspend.
*/
void suspend(); void suspend();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr> * Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -19,15 +19,14 @@
package fr.devinsy.sikevadb.core; package fr.devinsy.sikevadb.core;
/** /**
* * The Class ClosedDatabaseException.
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
*/ */
public class ClosedDatabaseException extends SikevaDBException public class ClosedDatabaseException extends SikevaDBException
{ {
private static final long serialVersionUID = 8364599416669077052L; private static final long serialVersionUID = 8364599416669077052L;
/** /**
* * Instantiates a new closed database exception.
*/ */
public ClosedDatabaseException() public ClosedDatabaseException()
{ {
@ -35,8 +34,10 @@ public class ClosedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new closed database exception.
* *
* @param message * @param message
* the message
*/ */
public ClosedDatabaseException(final String message) public ClosedDatabaseException(final String message)
{ {
@ -44,9 +45,12 @@ public class ClosedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new closed database exception.
* *
* @param message * @param message
* the message
* @param cause * @param cause
* the cause
*/ */
public ClosedDatabaseException(final String message, final Throwable cause) public ClosedDatabaseException(final String message, final Throwable cause)
{ {
@ -54,8 +58,10 @@ public class ClosedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new closed database exception.
* *
* @param cause * @param cause
* the cause
*/ */
public ClosedDatabaseException(final Throwable cause) public ClosedDatabaseException(final Throwable cause)
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018 Christian Pierre MOMON <christian.momon@devinsy.fr> * Copyright (C) 2018-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -19,15 +19,14 @@
package fr.devinsy.sikevadb.core; package fr.devinsy.sikevadb.core;
/** /**
* * The Class OpenedDatabaseException.
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
*/ */
public class OpenedDatabaseException extends SikevaDBException public class OpenedDatabaseException extends SikevaDBException
{ {
private static final long serialVersionUID = 8364599416669077052L; private static final long serialVersionUID = 8364599416669077052L;
/** /**
* * Instantiates a new opened database exception.
*/ */
public OpenedDatabaseException() public OpenedDatabaseException()
{ {
@ -35,8 +34,10 @@ public class OpenedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new opened database exception.
* *
* @param message * @param message
* the message
*/ */
public OpenedDatabaseException(final String message) public OpenedDatabaseException(final String message)
{ {
@ -44,9 +45,12 @@ public class OpenedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new opened database exception.
* *
* @param message * @param message
* the message
* @param cause * @param cause
* the cause
*/ */
public OpenedDatabaseException(final String message, final Throwable cause) public OpenedDatabaseException(final String message, final Throwable cause)
{ {
@ -54,8 +58,10 @@ public class OpenedDatabaseException extends SikevaDBException
} }
/** /**
* Instantiates a new opened database exception.
* *
* @param cause * @param cause
* the cause
*/ */
public OpenedDatabaseException(final Throwable cause) public OpenedDatabaseException(final Throwable cause)
{ {

View file

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2013-2018 Christian Pierre MOMON <christian.momon@devinsy.fr> * Copyright (C) 2013-2024 Christian Pierre MOMON <christian.momon@devinsy.fr>
* *
* This file is part of SikevaDB, simple key value database. * This file is part of SikevaDB, simple key value database.
* *
@ -284,18 +284,28 @@ public interface SikevaDB
public String getValue(String key, String subkey) throws SikevaDBException; public String getValue(String key, String subkey) throws SikevaDBException;
/** /**
* Gets the values of a key. * Gets the values.
* *
* @param key * @param key
* the key * the key
* @return the values * @return the values
* @throws SikevaDBException * @throws SikevaDBException
* the SikevaDB exception * the sikeva DB exception
*/ */
public StringList getValues(String key) throws SikevaDBException; public StringList getValues(String key) throws SikevaDBException;
/**
* Checks if is archive activated.
*
* @return true, if is archive activated
*/
boolean isArchiveActivated(); boolean isArchiveActivated();
/**
* Checks if is archive suspended.
*
* @return true, if is archive suspended
*/
boolean isArchiveSuspended(); boolean isArchiveSuspended();
/** /**

View file

@ -41,22 +41,20 @@ import fr.devinsy.xml.XMLZipWriter;
/** /**
* The Class XMLSikevaDB represents a XML persister. * The Class XMLSikevaDB represents a XML persister.
*
* @author Christian Pierre MOMON (christian.momon@devinsy.fr)
*/ */
public class XMLSikevaDB public class XMLSikevaDB
{ {
private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class); private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class);
/** /**
* Export in XML a database in a file. * Export.
* *
* @param out * @param out
* the out * the out
* @param source * @param source
* the source * the source
* @throws SikevaDBException * @throws SikevaDBException
* the SikevaDB exception * the sikeva DB exception
* @throws FileNotFoundException * @throws FileNotFoundException
* the file not found exception * the file not found exception
*/ */
@ -152,9 +150,6 @@ public class XMLSikevaDB
* the database * the database
* @param file * @param file
* the file * the file
*
* @throws Exception
* the exception
*/ */
public static void importData(final SikevaDB database, final File file) public static void importData(final SikevaDB database, final File file)
{ {
@ -178,6 +173,7 @@ public class XMLSikevaDB
* the in * the in
* @return the element * @return the element
* @throws SikevaDBException * @throws SikevaDBException
* the sikeva DB exception
*/ */
public static Element readElement(final XMLReader in) throws SikevaDBException public static Element readElement(final XMLReader in) throws SikevaDBException
{ {
@ -248,12 +244,8 @@ public class XMLSikevaDB
* the target * the target
* @param in * @param in
* the in * the in
* @throws XMLBadFormatException
* @throws XMLStreamException
* @throws SikevaDBException * @throws SikevaDBException
* * the sikeva DB exception
* @throws Exception
* the exception
*/ */
public static void readElements(final SikevaDB target, final XMLReader in) throws SikevaDBException public static void readElements(final SikevaDB target, final XMLReader in) throws SikevaDBException
{ {
@ -350,9 +342,7 @@ public class XMLSikevaDB
* @param source * @param source
* the source * the source
* @throws SikevaDBException * @throws SikevaDBException
* * the sikeva DB exception
* @throws Exception
* the exception
*/ */
public static void write(final XMLWriter out, final SikevaDB source) throws SikevaDBException public static void write(final XMLWriter out, final SikevaDB source) throws SikevaDBException
{ {

View file

@ -133,6 +133,7 @@ public class SQLSikevaDB implements SikevaDB
* Activate archiver. * Activate archiver.
* *
* @throws ClosedDatabaseException * @throws ClosedDatabaseException
* the closed database exception
*/ */
public void activateArchiver() throws ClosedDatabaseException public void activateArchiver() throws ClosedDatabaseException
{ {