Package com.openkm.sdk4j.impl
Class RepositoryImpl
- java.lang.Object
-
- com.openkm.sdk4j.impl.ClientImpl
-
- com.openkm.sdk4j.impl.RepositoryImpl
-
- All Implemented Interfaces:
BaseRepository,Serializable
public class RepositoryImpl extends ClientImpl implements BaseRepository, Serializable
RepositoryImpl- Author:
- sochoa
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RepositoryImpl(String host)RepositoryImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcopyAttributes(String uuid, String dstId, boolean categories, boolean keywords, boolean propertyGroups, boolean notes)Copy attributes.HqlQueryResultsexecuteHqlQuery(InputStream is)Execute hql query hql query results.HqlQueryResultsexecuteHqlQuery(String hql)Execute hql query hql query results.ScriptExecutionResultexecuteScript(InputStream is)Execute script script execution result.ScriptExecutionResultexecuteScript(String script)Execute script script execution result.SqlQueryResultsexecuteSqlQuery(InputStream is)Execute sql query sql query results.SqlQueryResultsexecuteSqlQuery(String sql)Execute sql query sql query results.AppVersiongetAppVersion()Gets app version.Map<String,String>getAvailableLocales(String locale)Gets available locales.FoldergetCategoriesFolder()Gets categories folder.List<ChangeLogged>getChangeLog(String nodePath, Calendar modificationsFrom)Gets change log.StringgetClusterUuid()Gets cluster uuid.ConfigurationgetConfiguration(String key)Gets configuration.booleangetIsFilePlan()Gets is file plan.LicenseInfogetLicenseInfo()Gets license info.FoldergetMailFolder()Gets mail folder.FoldergetMailFolderBase()Gets mail folder base.StringgetNodePath(String uuid)Gets node path.StringgetNodeUuid(String nodePath)Gets node uuid.FoldergetPersonalFolder()Gets personal folder.FoldergetPersonalFolderBase()Gets personal folder base.StringgetRepositoryUuid()Gets repository uuid.FoldergetRootFolder()Gets root folder.StringgetServerTime()Gets server time.FoldergetTemplatesFolder()Gets templates folder.Map<String,String>getTranslations(String lang, String module)Gets translations.FoldergetTrashFolder()Gets trash folder.FoldergetTrashFolderBase()Gets trash folder base.StringgetUpdateMessage()Gets update message.booleanhasNode(String nodeId)Has node boolean.voidpurgeTrash()Purge trash.protected voidsetAuthorizationToken(String authorizationToken)setAuthenticationToken-
Methods inherited from class com.openkm.sdk4j.impl.ClientImpl
getClient, getWebTarget, setAuthorizationHeader, setJsessionIdHeader
-
-
-
-
Constructor Detail
-
RepositoryImpl
public RepositoryImpl(String host)
RepositoryImpl
-
-
Method Detail
-
setAuthorizationToken
protected void setAuthorizationToken(String authorizationToken)
setAuthenticationToken
-
getRootFolder
public Folder getRootFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets root folder.- Specified by:
getRootFolderin interfaceBaseRepository- Returns:
- the root folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getTrashFolder
public Folder getTrashFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets trash folder.- Specified by:
getTrashFolderin interfaceBaseRepository- Returns:
- the trash folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getTrashFolderBase
public Folder getTrashFolderBase() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets trash folder base.- Specified by:
getTrashFolderBasein interfaceBaseRepository- Returns:
- the trash folder base
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getTemplatesFolder
public Folder getTemplatesFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets templates folder.- Specified by:
getTemplatesFolderin interfaceBaseRepository- Returns:
- the templates folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getPersonalFolder
public Folder getPersonalFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets personal folder.- Specified by:
getPersonalFolderin interfaceBaseRepository- Returns:
- the personal folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getPersonalFolderBase
public Folder getPersonalFolderBase() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets personal folder base.- Specified by:
getPersonalFolderBasein interfaceBaseRepository- Returns:
- the personal folder base
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getMailFolder
public Folder getMailFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets mail folder.- Specified by:
getMailFolderin interfaceBaseRepository- Returns:
- the mail folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getMailFolderBase
public Folder getMailFolderBase() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets mail folder base.- Specified by:
getMailFolderBasein interfaceBaseRepository- Returns:
- the mail folder base
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getCategoriesFolder
public Folder getCategoriesFolder() throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets categories folder.- Specified by:
getCategoriesFolderin interfaceBaseRepository- Returns:
- the categories folder
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
purgeTrash
public void purgeTrash() throws PathNotFoundException, AccessDeniedException, LockException, RepositoryException, DatabaseException, PromotedAsRecordLockException, UnknownException, WebserviceExceptionDescription copied from interface:BaseRepositoryPurge trash.- Specified by:
purgeTrashin interfaceBaseRepository- Throws:
PathNotFoundException- the path not found exceptionAccessDeniedException- the access denied exceptionLockException- the lock exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionPromotedAsRecordLockException- the promoted as record lock exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getUpdateMessage
public String getUpdateMessage() throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets update message.- Specified by:
getUpdateMessagein interfaceBaseRepository- Returns:
- the update message
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getRepositoryUuid
public String getRepositoryUuid() throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets repository uuid.- Specified by:
getRepositoryUuidin interfaceBaseRepository- Returns:
- the repository uuid
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
hasNode
public boolean hasNode(String nodeId) throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryHas node boolean.- Specified by:
hasNodein interfaceBaseRepository- Parameters:
nodeId- the node id- Returns:
- the boolean
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getNodePath
public String getNodePath(String uuid) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets node path.- Specified by:
getNodePathin interfaceBaseRepository- Parameters:
uuid- the uuid- Returns:
- the node path
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getNodeUuid
public String getNodeUuid(String nodePath) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets node uuid.- Specified by:
getNodeUuidin interfaceBaseRepository- Parameters:
nodePath- the node path- Returns:
- the node uuid
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getAppVersion
public AppVersion getAppVersion() throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets app version.- Specified by:
getAppVersionin interfaceBaseRepository- Returns:
- the app version
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
copyAttributes
public void copyAttributes(String uuid, String dstId, boolean categories, boolean keywords, boolean propertyGroups, boolean notes) throws ItemExistsException, PathNotFoundException, AccessDeniedException, RepositoryException, DatabaseException, UserQuotaExceededException, AutomationException, PromotedAsRecordLockException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryCopy attributes.- Specified by:
copyAttributesin interfaceBaseRepository- Parameters:
uuid- the uuiddstId- the dst idcategories- the categorieskeywords- the keywordspropertyGroups- the property groupsnotes- the notes- Throws:
ItemExistsException- the item exists exceptionPathNotFoundException- the path not found exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUserQuotaExceededException- the user quota exceeded exceptionAutomationException- the automation exceptionPromotedAsRecordLockException- the promoted as record lock exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
executeScript
public ScriptExecutionResult executeScript(InputStream is) throws AccessDeniedException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryExecute script script execution result.- Specified by:
executeScriptin interfaceBaseRepository- Parameters:
is- the is- Returns:
- the script execution result
- Throws:
AccessDeniedException- the access denied exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
executeScript
public ScriptExecutionResult executeScript(String script) throws AccessDeniedException, UnknownException, WebserviceException, IOException
Description copied from interface:BaseRepositoryExecute script script execution result.- Specified by:
executeScriptin interfaceBaseRepository- Parameters:
script- the script- Returns:
- the script execution result
- Throws:
AccessDeniedException- the access denied exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exceptionIOException- the io exception
-
executeSqlQuery
public SqlQueryResults executeSqlQuery(InputStream is) throws AccessDeniedException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryExecute sql query sql query results.- Specified by:
executeSqlQueryin interfaceBaseRepository- Parameters:
is- the is- Returns:
- the sql query results
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
executeSqlQuery
public SqlQueryResults executeSqlQuery(String sql) throws AccessDeniedException, DatabaseException, UnknownException, WebserviceException, IOException
Description copied from interface:BaseRepositoryExecute sql query sql query results.- Specified by:
executeSqlQueryin interfaceBaseRepository- Parameters:
sql- the sql- Returns:
- the sql query results
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exceptionIOException- the io exception
-
executeHqlQuery
public HqlQueryResults executeHqlQuery(InputStream is) throws AccessDeniedException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryExecute hql query hql query results.- Specified by:
executeHqlQueryin interfaceBaseRepository- Parameters:
is- the is- Returns:
- the hql query results
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
executeHqlQuery
public HqlQueryResults executeHqlQuery(String hql) throws AccessDeniedException, DatabaseException, UnknownException, WebserviceException, IOException
Description copied from interface:BaseRepositoryExecute hql query hql query results.- Specified by:
executeHqlQueryin interfaceBaseRepository- Parameters:
hql- the hql- Returns:
- the hql query results
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exceptionIOException- the io exception
-
getTranslations
public Map<String,String> getTranslations(String lang, String module) throws AccessDeniedException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets translations.- Specified by:
getTranslationsin interfaceBaseRepository- Parameters:
lang- the langmodule- the module- Returns:
- the translations
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getConfiguration
public Configuration getConfiguration(String key) throws DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets configuration.- Specified by:
getConfigurationin interfaceBaseRepository- Parameters:
key- the key- Returns:
- the configuration
- Throws:
DatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getChangeLog
public List<ChangeLogged> getChangeLog(String nodePath, Calendar modificationsFrom) throws AccessDeniedException, DatabaseException, PathNotFoundException, UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets change log.- Specified by:
getChangeLogin interfaceBaseRepository- Parameters:
nodePath- the node pathmodificationsFrom- the modifications from- Returns:
- the change log
- Throws:
AccessDeniedException- the access denied exceptionDatabaseException- the database exceptionPathNotFoundException- the path not found exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getAvailableLocales
public Map<String,String> getAvailableLocales(String locale) throws WebserviceException, PathNotFoundException, ParseException, RepositoryException, DatabaseException, UnknownException, AccessDeniedException
Description copied from interface:BaseRepositoryGets available locales.- Specified by:
getAvailableLocalesin interfaceBaseRepository- Parameters:
locale- the locale- Returns:
- the available locales
- Throws:
WebserviceException- the webservice exceptionPathNotFoundException- the path not found exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionAccessDeniedException- the access denied exception
-
getServerTime
public String getServerTime() throws UnknownException, WebserviceException
Description copied from interface:BaseRepositoryGets server time.- Specified by:
getServerTimein interfaceBaseRepository- Returns:
- the server time
- Throws:
UnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getLicenseInfo
public LicenseInfo getLicenseInfo() throws WebserviceException, RepositoryException, UnknownException, AccessDeniedException
Description copied from interface:BaseRepositoryGets license info.- Specified by:
getLicenseInfoin interfaceBaseRepository- Returns:
- the license info
- Throws:
WebserviceException- the webservice exceptionRepositoryException- the repository exceptionUnknownException- the unknown exceptionAccessDeniedException- the access denied exception
-
getClusterUuid
public String getClusterUuid() throws WebserviceException, RepositoryException, UnknownException
Description copied from interface:BaseRepositoryGets cluster uuid.- Specified by:
getClusterUuidin interfaceBaseRepository- Returns:
- the cluster uuid
- Throws:
WebserviceException- the webservice exceptionRepositoryException- the repository exceptionUnknownException- the unknown exception
-
getIsFilePlan
public boolean getIsFilePlan() throws WebserviceException, RepositoryException, UnknownExceptionDescription copied from interface:BaseRepositoryGets is file plan.- Specified by:
getIsFilePlanin interfaceBaseRepository- Returns:
- the is file plan
- Throws:
WebserviceException- the webservice exceptionRepositoryException- the repository exceptionUnknownException- the unknown exception
-
-