org.kinsources.kiwa.kernel
Class Kiwa

java.lang.Object
  extended by org.kinsources.kiwa.kernel.Kiwa

public class Kiwa
extends java.lang.Object

Class Kiwa uses singleton holder to be sure than Plaf modules are initialized.

Author:
Christian P. Momon

Nested Class Summary
static class Kiwa.Status
           
 
Field Summary
static int DEFAULT_RESET_PASSWORD_VALIDITY
           
static int STATISTICS_COMPUTING_MAXDELAY
           
 
Method Summary
 AccountManager accountManager()
           
 Actalog actalog()
           
 Actilog actilog()
           
 void activateAccount(Account account)
           
 void activateAccount(long accountId)
           
 Actulog actulog()
           
 LoadedFileHeader addAttachment(Dataset dataset, java.lang.String name, byte[] data)
           
 void addComment(Request request, long ownerId, java.lang.String comment)
           
 void addCommentFromAutomaticNotification(Dataset dataset, long ownerId, java.lang.String comment)
          This method add a comment in the current dataset sciboard request if on is alive from user action.
 void addDatasetGenealogyFile(Dataset dataset, LoadedFile originFile, java.util.List<org.tip.puck.net.workers.ControlReporter.ControlType> controls, java.util.Locale locale)
           
 void addDatasetTerminologyFile(Dataset dataset, LoadedFile originFile, java.util.List<org.tip.puck.net.relations.workers.RelationModelReporter.ControlType> controls, java.util.Locale locale)
           
 Agora agora()
           
 BuildInformation buildInformation()
           
 java.lang.String buildRequestDescription(Request source)
           
 void cancelFormatIssue(FormatIssue source)
           
 void cancelRequest(Request request, java.lang.String comment)
           
 LoadedFileHeaders censusLoadedFileHeaders()
           
 void clearStatistics(Dataset source)
           
 void clearStatistics(Datasets source)
           
 void clearStatistics(Dataset dataset, Statistics target)
           
 void clearStatisticsAll()
           
 void clearStatisticsGenealogies()
           
 void clearStatisticsTerminologies()
           
 void closeRequest(Request request, long decisionMakerId, Request.Status decision, java.lang.String comment)
           
 void confirmFormatIssue(FormatIssue source)
           
static org.tip.puck.report.Report controlNet(LoadedFile source, java.util.Locale locale, java.util.List<org.tip.puck.net.workers.ControlReporter.ControlType> controls)
           
static LoadedFile convert(java.lang.String targetExtension, java.lang.String targetName, LoadedFile source)
           
static LoadedFile convertNet(java.lang.String targetExtension, java.lang.String targetName, org.tip.puck.net.Net net)
           
 Account createAccount(java.lang.String email, java.lang.String firstName, java.lang.String lastName, java.lang.String password, Account.EmailScope emailScope, java.lang.String organization, java.lang.String businessCard, java.lang.String country, java.lang.String website, org.joda.time.DateTimeZone timeZone, boolean emailNotification)
           
 Article createArticle(java.lang.String name, java.lang.String author, boolean visible, java.util.Locale locale, java.lang.String text)
           
 void createCollaborator(Dataset dataset, Account collaboratorAccount, java.lang.String description, org.tip.puck.net.workers.AttributeFilters filters)
           
 Collection createCollection(Contributor contributor, java.lang.String name, java.lang.String description, Collection.Scope scope)
           
 Dataset createDataset(Contributor contributor, java.lang.String name)
           
 FormatIssue createFormatIssue(long contributorId, long datasetId, LoadedFile file)
           
 Forum createForum(java.lang.String title, java.lang.String subtitle)
           
 Message createMessage(Topic parent, Account author, java.lang.String text)
           
 Topic createTopic(Forum forum, java.lang.String title, java.lang.String text, boolean sticky, Topic.Status status, Account author)
           
 Wire createWire(java.lang.String title, java.lang.String author, org.joda.time.DateTime publicationDate, java.util.Locale locale, java.lang.String leadParagraph, java.lang.String body)
           
 void downForum(Forum forum)
           
 EnvironmentInformation environmentInformation()
           
 Eucles eucles()
           
 void export(java.io.OutputStream out, KiwaExportCriteria criteria)
           
 Dataset.Type extractDatasetTypeFromRequest(Request source)
           
 fr.devinsy.util.StringList findOrphanSubkeys()
           
 Account getAuthentifiedAccount(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 java.lang.Long getAuthentifiedAccountId(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 KiwaCharterView getCharterView()
           
 DatasetFile getDatasetFile(Dataset dataset, Account account)
           
 fr.devinsy.xidyn.views.CharterView getEmailCharterView()
           
 byte[] getKidarepFile(long id)
           
 LoadedFile getLoadedFile(LoadedFileHeader source)
           
 LoadedFile getLoadedFileDetached(LoadedFileHeader source)
           
 int getResetPasswordValidity()
           
 Kiwa.Status getStatus()
           
 java.lang.String getUserLanguage(javax.servlet.http.HttpServletRequest request)
           
 java.util.Locale getUserLocale(javax.servlet.http.HttpServletRequest request)
           
 java.lang.String getWebContentPath()
           
 java.lang.String getWebsiteUrl()
           
 Hico hico()
           
 java.lang.String howToCite(Dataset source)
           
 void importArticles(byte[] source)
           
static Kiwa instance()
           
 boolean isModerator(Account account)
           
 boolean isRedactor(Account account)
           
 boolean isSciboarder(Account account)
           
 boolean isScichief(Account account)
           
 boolean isWebmaster(Account account)
           
 Kidarep kidarep()
           
 java.lang.String[] languages()
           
static java.awt.image.BufferedImage loadImage(LoadedFile source)
           
static org.tip.puck.net.Net loadNet(LoadedFile source)
           
static org.tip.puck.net.Net loadNet(LoadedFile source, java.lang.String charsetName)
           
static org.tip.puck.net.Net loadNetTXT1(LoadedFile source, java.lang.String charsetName)
           
static org.tip.puck.net.Net loadNetXLS1(LoadedFile source)
           
static org.tip.puck.net.relations.RelationModel loadTerminology(LoadedFile source)
           
static org.tip.puck.net.relations.RelationModel loadTerminology(LoadedFile source, java.lang.String charsetName)
           
 Log log(Log.Level level, java.lang.String event)
           
 Log log(Log.Level level, java.lang.String event, java.lang.String detail)
           
 Log log(Log.Level level, java.lang.String event, java.lang.String detailFormat, java.lang.Object... details)
           
 EventLog logEvent(EventLog.Category category, java.lang.String... arguments)
           
protected  void logKiwaInit(java.lang.String currentLogItem, java.lang.String status)
           
 void logPageHit(java.lang.String page, javax.servlet.http.HttpServletRequest request)
           
 void notifyFormatInspectors(java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 void notifyMembers(Accounts accounts, java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 void notifyModerators(Account author, java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 void notifySciboarderChiefs(Account author, java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 void notifySciboarders(Account author, java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 void notifyWebmasters(Account author, java.lang.String subject, java.lang.CharSequence content, java.util.Locale locale)
           
 java.lang.String permanentURI(Dataset dataset)
           
 void publishDataset(Dataset source)
           
 void publishWire(long wireId)
           
 void purgeActalog(int days)
           
 void purgeActilog(int days)
           
 void purgeFormatIssues(int days)
           
 void purgeOrphans()
           
 void putPermanentLinkAttribute(org.tip.puck.net.Net net, Dataset dataset)
           
 void rebuildGenealogyStatistics(Dataset dataset, DatasetFile datasetFile)
           
 void rebuildGenealogyStatisticsByThread(Dataset dataset, DatasetFile datasetFile)
          This method rebuilds genealogy statistics.
 void rebuildStatistics(Dataset source)
           
 void rebuildStatistics(Dataset dataset, DatasetFile datasetFile)
           
 void rebuildStatistics(Datasets source)
           
 void rebuildStatisticsAll()
           
 void rebuildStatisticsGenealogies()
           
 void rebuildStatisticsTerminologies()
           
 void rebuildTerminologyStatistics(Dataset dataset, DatasetFile datasetFile)
           
 void removeAccount(long accountId)
           
 void removeAllArticles()
           
 void removeArticle(long articleId)
           
 void removeCollaborator(Dataset dataset, Collaborator collaborator)
           
 void removeCollaborator(Dataset dataset, long collaboratorId)
           
 void removeCollection(Collection target)
           
 void removeDataset(Dataset source)
           
 void removeDatasetAttachment(Dataset dataset, LoadedFileHeader attachment)
           
 void removeDatasetFromCollection(Dataset source, Collection collection)
           
 void removeDatasetOriginFile(Dataset dataset)
           
 void removeFormatIssue(FormatIssue source)
           
 void removeForum(Forum forum)
           
 void removeForum(long forumId)
           
 void removeMessage(long messageId)
           
 void removeMessage(Message message)
           
 void removeTopic(long topicId)
           
 void removeTopic(Topic topic)
           
 void removeWire(long wireId)
           
static LoadedFile saveImage(java.lang.String targetFileName, java.awt.image.BufferedImage image)
           
static LoadedFile saveNet(java.lang.String targetFileName, org.tip.puck.net.Net net)
           
static byte[] saveNetToByteArray(org.tip.puck.graphs.GraphType graphType, org.tip.puck.net.Net net)
           
static byte[] saveNetToByteArray(java.lang.String extension, org.tip.puck.net.Net net)
           
 Sciboard sciboard()
           
 fr.devinsy.kiss4web.SimpleSecurityAgent securityAgent()
           
 void sendEmail(java.lang.String to, java.lang.String subject, java.lang.CharSequence html)
           
 void setAccountPassword(Account account, java.lang.String password)
           
 void setCharterView(KiwaCharterView view)
           
 void setDataRoot(java.lang.String key, java.lang.Object root)
           
 void setEmailCharterView(fr.devinsy.xidyn.views.CharterView view)
           
 void setLogLevel(Log.Level value)
           
 void setResetPasswordValidity(int value)
           
 void setStatus(Kiwa.Status status)
           
 void setUserLanguage(javax.servlet.http.HttpServletResponse response, java.lang.String language)
           
 void setVote(Request request, long ownerId, Vote.Value value)
           
 void setWebContentPath(java.lang.String path)
           
 Stag stag()
           
 KiwaStorer storer()
           
 Request submitDataset(Dataset dataset, Account account, java.lang.String comment)
           
 Request submitDatasetUnpublish(Dataset dataset, Account account, java.lang.String comment)
           
 void suspendAccount(long accountId)
           
 void transferDataset(Contributor newContributor, Dataset source)
           
 void unpublishDataset(Dataset dataset)
           
 void unpublishWire(long wireId)
           
 void updateAccount(Account account, java.lang.String firstName, java.lang.String lastName, java.lang.String password, Account.EmailScope emailScope, java.lang.String organization, java.lang.String businessCard, java.lang.String country, java.lang.String website, org.joda.time.DateTimeZone timeZone, boolean emailNotification)
           
 void updateAccountByWebmaster(Account account, java.lang.String firstName, java.lang.String lastName, java.lang.String email, Account.EmailScope emailScope, java.lang.String organization, java.lang.String businessCard, java.lang.String country, java.lang.String website, org.joda.time.DateTimeZone timeZone, boolean emailNotification, Roles roles)
           
 void updateAccountEmail(Account account, java.lang.String newEmail)
           
 void updateAccountLastConnection(Account account)
           
 void updateArticle(Article article, java.lang.String name, java.lang.String author, boolean visibility, java.util.Locale locale, java.lang.String text)
           
 Collaborator updateCollaborator(Dataset dataset, long collaboratorId, java.lang.String description, org.tip.puck.net.workers.AttributeFilters filters)
           
 void updateDataset(Dataset dataset)
           
 void updateForum(Forum forum, java.lang.String title, java.lang.String subtitle)
           
 void updateMessage(Message message, java.lang.String text)
           
 void updateTopic(Topic topic, long forumId, java.lang.String title, boolean sticky, Topic.Status status)
           
 void updateWire(Wire wire, java.lang.String title, java.lang.String author, org.joda.time.DateTime publicationDate, java.util.Locale locale, java.lang.String leadParagraph, java.lang.String body)
           
 void upForum(Forum forum)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STATISTICS_COMPUTING_MAXDELAY

public static int STATISTICS_COMPUTING_MAXDELAY

DEFAULT_RESET_PASSWORD_VALIDITY

public static int DEFAULT_RESET_PASSWORD_VALIDITY
Method Detail

accountManager

public AccountManager accountManager()
Returns:

actalog

public Actalog actalog()
Returns:

actilog

public Actilog actilog()
Returns:

activateAccount

public void activateAccount(Account account)
Parameters:
fullName -
email -
password -

activateAccount

public void activateAccount(long accountId)
Parameters:
id -

actulog

public Actulog actulog()
Returns:

addAttachment

public LoadedFileHeader addAttachment(Dataset dataset,
                                      java.lang.String name,
                                      byte[] data)
Parameters:
dataset -
name -
data -
Returns:

addComment

public void addComment(Request request,
                       long ownerId,
                       java.lang.String comment)
Parameters:
request -
ownerId -
comment -

addCommentFromAutomaticNotification

public void addCommentFromAutomaticNotification(Dataset dataset,
                                                long ownerId,
                                                java.lang.String comment)
This method add a comment in the current dataset sciboard request if on is alive from user action. Useful to notify the sciboard that contributor edited metadata or attachment files.

Parameters:
dataset -
ownerId -
comment -

addDatasetGenealogyFile

public void addDatasetGenealogyFile(Dataset dataset,
                                    LoadedFile originFile,
                                    java.util.List<org.tip.puck.net.workers.ControlReporter.ControlType> controls,
                                    java.util.Locale locale)
                             throws java.lang.Exception
Parameters:
dataset -
originFile -
controls -
locale -
Throws:
java.lang.Exception

addDatasetTerminologyFile

public void addDatasetTerminologyFile(Dataset dataset,
                                      LoadedFile originFile,
                                      java.util.List<org.tip.puck.net.relations.workers.RelationModelReporter.ControlType> controls,
                                      java.util.Locale locale)
                               throws java.lang.Exception
Parameters:
dataset -
originFile -
controls -
locale -
Throws:
java.lang.Exception

agora

public Agora agora()
Returns:

buildInformation

public BuildInformation buildInformation()

buildRequestDescription

public java.lang.String buildRequestDescription(Request source)
Returns:

cancelFormatIssue

public void cancelFormatIssue(FormatIssue source)
                       throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

cancelRequest

public void cancelRequest(Request request,
                          java.lang.String comment)
                   throws java.lang.Exception
Parameters:
request -
comment -
Throws:
java.lang.Exception

censusLoadedFileHeaders

public LoadedFileHeaders censusLoadedFileHeaders()
                                          throws java.lang.Exception
Returns:
Throws:
java.lang.Exception

clearStatistics

public void clearStatistics(Dataset source)
                     throws java.lang.Exception
Parameters:
dataset -
Throws:
java.lang.Exception

clearStatistics

public void clearStatistics(Dataset dataset,
                            Statistics target)
                     throws java.lang.Exception
Parameters:
dataset -
Throws:
java.lang.Exception

clearStatistics

public void clearStatistics(Datasets source)
                     throws KiwaException
Throws:
KiwaException
java.lang.Exception

clearStatisticsAll

public void clearStatisticsAll()
                        throws KiwaException
Throws:
KiwaException

clearStatisticsGenealogies

public void clearStatisticsGenealogies()
                                throws KiwaException
Throws:
KiwaException

clearStatisticsTerminologies

public void clearStatisticsTerminologies()
                                  throws KiwaException
Throws:
KiwaException

closeRequest

public void closeRequest(Request request,
                         long decisionMakerId,
                         Request.Status decision,
                         java.lang.String comment)
                  throws java.lang.Exception
Parameters:
request -
ownerId -
Throws:
java.lang.Exception

confirmFormatIssue

public void confirmFormatIssue(FormatIssue source)
                        throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

createAccount

public Account createAccount(java.lang.String email,
                             java.lang.String firstName,
                             java.lang.String lastName,
                             java.lang.String password,
                             Account.EmailScope emailScope,
                             java.lang.String organization,
                             java.lang.String businessCard,
                             java.lang.String country,
                             java.lang.String website,
                             org.joda.time.DateTimeZone timeZone,
                             boolean emailNotification)
Parameters:
email -
fullName -
password -
emailScope -
organization -
businessCard -
country -
timeZone -
emailNotification -

createArticle

public Article createArticle(java.lang.String name,
                             java.lang.String author,
                             boolean visible,
                             java.util.Locale locale,
                             java.lang.String text)
Parameters:
name -
author -
visible -
locale -
text -
Returns:

createCollaborator

public void createCollaborator(Dataset dataset,
                               Account collaboratorAccount,
                               java.lang.String description,
                               org.tip.puck.net.workers.AttributeFilters filters)
                        throws java.lang.Exception
Parameters:
dataset -
collaboratorAccount -
description -
filters -
Throws:
java.lang.Exception

createCollection

public Collection createCollection(Contributor contributor,
                                   java.lang.String name,
                                   java.lang.String description,
                                   Collection.Scope scope)
Parameters:
contributor -
name -
description -
scope -
Returns:

createDataset

public Dataset createDataset(Contributor contributor,
                             java.lang.String name)
Parameters:
contributor -
name -
Returns:

createFormatIssue

public FormatIssue createFormatIssue(long contributorId,
                                     long datasetId,
                                     LoadedFile file)
Parameters:
contributorId -
datasetId -
file -
Returns:

createForum

public Forum createForum(java.lang.String title,
                         java.lang.String subtitle)
Parameters:
title -
subtitle -
Returns:

createMessage

public Message createMessage(Topic parent,
                             Account author,
                             java.lang.String text)
Parameters:
title -
subTitle -
Returns:

createTopic

public Topic createTopic(Forum forum,
                         java.lang.String title,
                         java.lang.String text,
                         boolean sticky,
                         Topic.Status status,
                         Account author)
Parameters:
title -
subtitle -
Returns:

createWire

public Wire createWire(java.lang.String title,
                       java.lang.String author,
                       org.joda.time.DateTime publicationDate,
                       java.util.Locale locale,
                       java.lang.String leadParagraph,
                       java.lang.String body)
Parameters:
email -
fullName -
password -
emailScope -
organization -
businessCard -
country -
timeZone -
emailNotification -

downForum

public void downForum(Forum forum)
               throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

environmentInformation

public EnvironmentInformation environmentInformation()
Returns:

eucles

public Eucles eucles()
Returns:

export

public void export(java.io.OutputStream out,
                   KiwaExportCriteria criteria)
            throws java.io.IOException
Parameters:
out -
criteria -
Throws:
java.io.IOException

extractDatasetTypeFromRequest

public Dataset.Type extractDatasetTypeFromRequest(Request source)
Parameters:
source -
Returns:

findOrphanSubkeys

public fr.devinsy.util.StringList findOrphanSubkeys()
                                             throws java.lang.Exception
Returns:
Throws:
java.lang.Exception

getAuthentifiedAccount

public Account getAuthentifiedAccount(javax.servlet.http.HttpServletRequest request,
                                      javax.servlet.http.HttpServletResponse response)
Parameters:
request -
Returns:

getAuthentifiedAccountId

public java.lang.Long getAuthentifiedAccountId(javax.servlet.http.HttpServletRequest request,
                                               javax.servlet.http.HttpServletResponse response)
Parameters:
request -
Returns:

getCharterView

public KiwaCharterView getCharterView()
Returns:

getDatasetFile

public DatasetFile getDatasetFile(Dataset dataset,
                                  Account account)
Parameters:
dataset -
account -
Returns:

getEmailCharterView

public fr.devinsy.xidyn.views.CharterView getEmailCharterView()
Returns:

getKidarepFile

public byte[] getKidarepFile(long id)
Parameters:
id -
Returns:

getLoadedFile

public LoadedFile getLoadedFile(LoadedFileHeader source)
Parameters:
source -
Returns:

getLoadedFileDetached

public LoadedFile getLoadedFileDetached(LoadedFileHeader source)
Parameters:
source -
Returns:

getResetPasswordValidity

public int getResetPasswordValidity()
Returns:

getStatus

public Kiwa.Status getStatus()
Returns:

getUserLanguage

public java.lang.String getUserLanguage(javax.servlet.http.HttpServletRequest request)

getUserLocale

public java.util.Locale getUserLocale(javax.servlet.http.HttpServletRequest request)

getWebContentPath

public java.lang.String getWebContentPath()
Returns:

getWebsiteUrl

public java.lang.String getWebsiteUrl()
Returns:

hico

public Hico hico()
Returns:

howToCite

public java.lang.String howToCite(Dataset source)
Returns:

importArticles

public void importArticles(byte[] source)
                    throws java.lang.Exception
Parameters:
out -
criteria -
Throws:
java.io.IOException
java.lang.Exception

isModerator

public boolean isModerator(Account account)
Parameters:
account -
Returns:

isRedactor

public boolean isRedactor(Account account)
Parameters:
account -
Returns:

isSciboarder

public boolean isSciboarder(Account account)
Parameters:
account -
Returns:

isScichief

public boolean isScichief(Account account)
Parameters:
account -
Returns:

isWebmaster

public boolean isWebmaster(Account account)
Parameters:
account -
Returns:

kidarep

public Kidarep kidarep()
Returns:

languages

public java.lang.String[] languages()

log

public Log log(Log.Level level,
               java.lang.String event)
Parameters:
level -
category -
comment -

log

public Log log(Log.Level level,
               java.lang.String event,
               java.lang.String detail)
Parameters:
level -
category -
comment -

log

public Log log(Log.Level level,
               java.lang.String event,
               java.lang.String detailFormat,
               java.lang.Object... details)
Parameters:
level -
category -
comment -

logEvent

public EventLog logEvent(EventLog.Category category,
                         java.lang.String... arguments)
Parameters:
level -
category -
comment -

logKiwaInit

protected void logKiwaInit(java.lang.String currentLogItem,
                           java.lang.String status)
Parameters:
currentLogItem -
status -

logPageHit

public void logPageHit(java.lang.String page,
                       javax.servlet.http.HttpServletRequest request)
Parameters:
page -
request -

notifyFormatInspectors

public void notifyFormatInspectors(java.lang.String subject,
                                   java.lang.CharSequence content,
                                   java.util.Locale locale)
                            throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

notifyMembers

public void notifyMembers(Accounts accounts,
                          java.lang.String subject,
                          java.lang.CharSequence content,
                          java.util.Locale locale)
                   throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

notifyModerators

public void notifyModerators(Account author,
                             java.lang.String subject,
                             java.lang.CharSequence content,
                             java.util.Locale locale)
                      throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

notifySciboarderChiefs

public void notifySciboarderChiefs(Account author,
                                   java.lang.String subject,
                                   java.lang.CharSequence content,
                                   java.util.Locale locale)
                            throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

notifySciboarders

public void notifySciboarders(Account author,
                              java.lang.String subject,
                              java.lang.CharSequence content,
                              java.util.Locale locale)
                       throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

notifyWebmasters

public void notifyWebmasters(Account author,
                             java.lang.String subject,
                             java.lang.CharSequence content,
                             java.util.Locale locale)
                      throws java.lang.Exception
Parameters:
subject -
html -
Throws:
java.lang.Exception

permanentURI

public java.lang.String permanentURI(Dataset dataset)
Parameters:
dataset -
Returns:

publishDataset

public void publishDataset(Dataset source)
Parameters:
source -

publishWire

public void publishWire(long wireId)
                 throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

purgeActalog

public void purgeActalog(int days)
                  throws java.lang.Exception
Parameters:
days -
Throws:
java.lang.Exception

purgeActilog

public void purgeActilog(int days)
                  throws java.lang.Exception
Parameters:
days -
Throws:
java.lang.Exception

purgeFormatIssues

public void purgeFormatIssues(int days)
                       throws java.lang.Exception
Parameters:
days -
Throws:
java.lang.Exception

purgeOrphans

public void purgeOrphans()
                  throws java.lang.NumberFormatException,
                         java.lang.Exception
Throws:
java.lang.Exception
java.lang.NumberFormatException

putPermanentLinkAttribute

public void putPermanentLinkAttribute(org.tip.puck.net.Net net,
                                      Dataset dataset)
Parameters:
net -

rebuildGenealogyStatistics

public void rebuildGenealogyStatistics(Dataset dataset,
                                       DatasetFile datasetFile)
                                throws java.lang.Exception
Parameters:
dataset -
datasetFile -
Throws:
java.lang.Exception

rebuildGenealogyStatisticsByThread

public void rebuildGenealogyStatisticsByThread(Dataset dataset,
                                               DatasetFile datasetFile)
                                        throws java.lang.Exception
This method rebuilds genealogy statistics. In case of huge dataset, the computing can take a very long time, so a thread way is used on them. The computing sort is changed for thread way.

Parameters:
source -
Throws:
java.lang.Exception

rebuildStatistics

public void rebuildStatistics(Dataset source)
                       throws java.lang.Exception
Parameters:
dataset -
Throws:
java.lang.Exception

rebuildStatistics

public void rebuildStatistics(Dataset dataset,
                              DatasetFile datasetFile)
                       throws java.lang.Exception
Parameters:
source -
Throws:
java.lang.Exception

rebuildStatistics

public void rebuildStatistics(Datasets source)
                       throws KiwaException
Throws:
KiwaException
java.lang.Exception

rebuildStatisticsAll

public void rebuildStatisticsAll()
                          throws KiwaException
Parameters:
dataset -
Throws:
KiwaException

rebuildStatisticsGenealogies

public void rebuildStatisticsGenealogies()
                                  throws KiwaException
Parameters:
dataset -
Throws:
KiwaException

rebuildStatisticsTerminologies

public void rebuildStatisticsTerminologies()
                                    throws KiwaException
Parameters:
dataset -
Throws:
KiwaException

rebuildTerminologyStatistics

public void rebuildTerminologyStatistics(Dataset dataset,
                                         DatasetFile datasetFile)
                                  throws java.lang.Exception
Parameters:
dataset -
Throws:
java.lang.Exception

removeAccount

public void removeAccount(long accountId)
Parameters:
id -

removeAllArticles

public void removeAllArticles()
                       throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeArticle

public void removeArticle(long articleId)
                   throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeCollaborator

public void removeCollaborator(Dataset dataset,
                               Collaborator collaborator)
                        throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeCollaborator

public void removeCollaborator(Dataset dataset,
                               long collaboratorId)
                        throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeCollection

public void removeCollection(Collection target)
                      throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeDataset

public void removeDataset(Dataset source)
                   throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeDatasetAttachment

public void removeDatasetAttachment(Dataset dataset,
                                    LoadedFileHeader attachment)
                             throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeDatasetFromCollection

public void removeDatasetFromCollection(Dataset source,
                                        Collection collection)
Parameters:
id -

removeDatasetOriginFile

public void removeDatasetOriginFile(Dataset dataset)
                             throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeFormatIssue

public void removeFormatIssue(FormatIssue source)
                       throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeForum

public void removeForum(Forum forum)
                 throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeForum

public void removeForum(long forumId)
                 throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeMessage

public void removeMessage(long messageId)
                   throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeMessage

public void removeMessage(Message message)
                   throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeTopic

public void removeTopic(long topicId)
                 throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeTopic

public void removeTopic(Topic topic)
                 throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

removeWire

public void removeWire(long wireId)
                throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

sciboard

public Sciboard sciboard()
Returns:

securityAgent

public fr.devinsy.kiss4web.SimpleSecurityAgent securityAgent()
Returns:

sendEmail

public void sendEmail(java.lang.String to,
                      java.lang.String subject,
                      java.lang.CharSequence html)
Parameters:
to -
subject -
html -

setAccountPassword

public void setAccountPassword(Account account,
                               java.lang.String password)
Parameters:
account -
password -

setCharterView

public void setCharterView(KiwaCharterView view)
Parameters:
charterView -

setDataRoot

public void setDataRoot(java.lang.String key,
                        java.lang.Object root)
Parameters:
key -

setEmailCharterView

public void setEmailCharterView(fr.devinsy.xidyn.views.CharterView view)
Parameters:
charterView -

setLogLevel

public void setLogLevel(Log.Level value)
Parameters:
value -

setResetPasswordValidity

public void setResetPasswordValidity(int value)
Parameters:
value - in minutes

setStatus

public void setStatus(Kiwa.Status status)
Parameters:
status -

setUserLanguage

public void setUserLanguage(javax.servlet.http.HttpServletResponse response,
                            java.lang.String language)

setVote

public void setVote(Request request,
                    long ownerId,
                    Vote.Value value)
Parameters:
request -
ownerId -
value -

setWebContentPath

public void setWebContentPath(java.lang.String path)
Parameters:
path -

stag

public Stag stag()

storer

public KiwaStorer storer()
Returns:

submitDataset

public Request submitDataset(Dataset dataset,
                             Account account,
                             java.lang.String comment)
                      throws java.lang.Exception
Parameters:
dataset -
comment -
Throws:
java.lang.Exception

submitDatasetUnpublish

public Request submitDatasetUnpublish(Dataset dataset,
                                      Account account,
                                      java.lang.String comment)
                               throws org.tip.puck.PuckException
Parameters:
dataset -
filter -
comment -
Throws:
org.tip.puck.PuckException

suspendAccount

public void suspendAccount(long accountId)
Parameters:
id -

transferDataset

public void transferDataset(Contributor newContributor,
                            Dataset source)
                     throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

unpublishDataset

public void unpublishDataset(Dataset dataset)
                      throws java.lang.Exception
Parameters:
dataset -
Throws:
java.lang.Exception

unpublishWire

public void unpublishWire(long wireId)
                   throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

updateAccount

public void updateAccount(Account account,
                          java.lang.String firstName,
                          java.lang.String lastName,
                          java.lang.String password,
                          Account.EmailScope emailScope,
                          java.lang.String organization,
                          java.lang.String businessCard,
                          java.lang.String country,
                          java.lang.String website,
                          org.joda.time.DateTimeZone timeZone,
                          boolean emailNotification)
Parameters:
email -
fullName -
password -
emailScope -
organization -
businessCard -
country -
timeZone -
emailNotification -

updateAccountByWebmaster

public void updateAccountByWebmaster(Account account,
                                     java.lang.String firstName,
                                     java.lang.String lastName,
                                     java.lang.String email,
                                     Account.EmailScope emailScope,
                                     java.lang.String organization,
                                     java.lang.String businessCard,
                                     java.lang.String country,
                                     java.lang.String website,
                                     org.joda.time.DateTimeZone timeZone,
                                     boolean emailNotification,
                                     Roles roles)
Parameters:
email -
fullName -
password -
emailScope -
organization -
businessCard -
country -
timeZone -
emailNotification -

updateAccountEmail

public void updateAccountEmail(Account account,
                               java.lang.String newEmail)
Parameters:
fullName -
email -
password -

updateAccountLastConnection

public void updateAccountLastConnection(Account account)

updateArticle

public void updateArticle(Article article,
                          java.lang.String name,
                          java.lang.String author,
                          boolean visibility,
                          java.util.Locale locale,
                          java.lang.String text)
Parameters:
wire -
title -
author -
publicationDate -
locale -
leadParagraph -
body -

updateCollaborator

public Collaborator updateCollaborator(Dataset dataset,
                                       long collaboratorId,
                                       java.lang.String description,
                                       org.tip.puck.net.workers.AttributeFilters filters)
                                throws java.lang.Exception
Parameters:
collaboratorId -
description -
filters -
Throws:
java.lang.Exception

updateDataset

public void updateDataset(Dataset dataset)
Parameters:
contributor -
name -

updateForum

public void updateForum(Forum forum,
                        java.lang.String title,
                        java.lang.String subtitle)
Parameters:
forum -
title -
subtitle -

updateMessage

public void updateMessage(Message message,
                          java.lang.String text)
Parameters:
forum -
title -
subtitle -

updateTopic

public void updateTopic(Topic topic,
                        long forumId,
                        java.lang.String title,
                        boolean sticky,
                        Topic.Status status)
Parameters:
forum -
title -
subtitle -

updateWire

public void updateWire(Wire wire,
                       java.lang.String title,
                       java.lang.String author,
                       org.joda.time.DateTime publicationDate,
                       java.util.Locale locale,
                       java.lang.String leadParagraph,
                       java.lang.String body)
Parameters:
wire -
title -
author -
publicationDate -
locale -
leadParagraph -
body -

upForum

public void upForum(Forum forum)
             throws java.lang.Exception
Parameters:
id -
Throws:
java.lang.Exception

controlNet

public static org.tip.puck.report.Report controlNet(LoadedFile source,
                                                    java.util.Locale locale,
                                                    java.util.List<org.tip.puck.net.workers.ControlReporter.ControlType> controls)
                                             throws KiwaControlException,
                                                    java.io.IOException,
                                                    KiwaBadFileFormatException
Parameters:
source -
locale -
controls -
Returns:
Throws:
KiwaControlException
java.io.IOException
KiwaBadFileFormatException

convert

public static LoadedFile convert(java.lang.String targetExtension,
                                 java.lang.String targetName,
                                 LoadedFile source)
                          throws org.tip.puck.PuckException
Parameters:
targetExtension -
sourceFileName -
sourceData -
Returns:
Throws:
org.tip.puck.PuckException

convertNet

public static LoadedFile convertNet(java.lang.String targetExtension,
                                    java.lang.String targetName,
                                    org.tip.puck.net.Net net)
                             throws org.tip.puck.PuckException
Parameters:
targetExtension -
sourceFileName -
sourceData -
Returns:
Throws:
org.tip.puck.PuckException

instance

public static Kiwa instance()
Returns:

loadImage

public static java.awt.image.BufferedImage loadImage(LoadedFile source)
                                              throws java.io.IOException
Parameters:
source -
Returns:
Throws:
java.io.IOException

loadNet

public static org.tip.puck.net.Net loadNet(LoadedFile source)
                                    throws org.tip.puck.PuckException
Parameters:
source -
Returns:
Throws:
org.tip.puck.PuckException

loadNet

public static org.tip.puck.net.Net loadNet(LoadedFile source,
                                           java.lang.String charsetName)
                                    throws org.tip.puck.PuckException
Parameters:
pathname -
Returns:
Throws:
org.tip.puck.PuckException
java.io.IOException
java.lang.Exception

loadNetTXT1

public static org.tip.puck.net.Net loadNetTXT1(LoadedFile source,
                                               java.lang.String charsetName)
                                        throws org.tip.puck.PuckException
Parameters:
pathname -
Returns:
Throws:
org.tip.puck.PuckException
java.io.IOException
java.lang.Exception

loadNetXLS1

public static org.tip.puck.net.Net loadNetXLS1(LoadedFile source)
                                        throws org.tip.puck.PuckException
Parameters:
pathname -
Returns:
Throws:
org.tip.puck.PuckException
java.io.IOException
java.lang.Exception

loadTerminology

public static org.tip.puck.net.relations.RelationModel loadTerminology(LoadedFile source)
                                                                throws org.tip.puck.PuckException
Parameters:
source -
Returns:
Throws:
org.tip.puck.PuckException

loadTerminology

public static org.tip.puck.net.relations.RelationModel loadTerminology(LoadedFile source,
                                                                       java.lang.String charsetName)
                                                                throws org.tip.puck.PuckException
Parameters:
source -
charsetName -
Returns:
Throws:
org.tip.puck.PuckException

saveImage

public static LoadedFile saveImage(java.lang.String targetFileName,
                                   java.awt.image.BufferedImage image)
                            throws java.io.IOException
Parameters:
targetFileName -
image -
Returns:
Throws:
java.io.IOException

saveNet

public static LoadedFile saveNet(java.lang.String targetFileName,
                                 org.tip.puck.net.Net net)
                          throws org.tip.puck.PuckException
Parameters:
targetExtension -
sourceFileName -
sourceData -
Returns:
Throws:
org.tip.puck.PuckException

saveNetToByteArray

public static byte[] saveNetToByteArray(org.tip.puck.graphs.GraphType graphType,
                                        org.tip.puck.net.Net net)
                                 throws org.tip.puck.PuckException
Parameters:
net -
Returns:
Throws:
org.tip.puck.PuckException

saveNetToByteArray

public static byte[] saveNetToByteArray(java.lang.String extension,
                                        org.tip.puck.net.Net net)
                                 throws org.tip.puck.PuckException
Parameters:
net -
Returns:
Throws:
org.tip.puck.PuckException