|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xpn.xwiki.api.Api
com.xpn.xwiki.api.Document
com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument
com.xpn.xwiki.plugin.applicationmanager.doc.XWikiApplication
public class XWikiApplication
This class manage an XWiki document containing XApp.XWikiApplicationClass object. It add some specifics methods, getters and setters for this type of object and fields.
Field Summary |
---|
Fields inherited from class com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument |
---|
isNew, objectId, sclass |
Fields inherited from class com.xpn.xwiki.api.Document |
---|
cloned, currentObj, doc |
Fields inherited from class com.xpn.xwiki.api.Api |
---|
context |
Fields inherited from interface com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.XObjectDocument |
---|
SPACE_DOC_SEPARATOR, WIKI_SPACE_SEPARATOR |
Constructor Summary | |
---|---|
XWikiApplication(XWikiDocument xdoc,
int objectId,
XWikiContext context)
Create new XWikiApplication managing provided XWikiDocument. |
Method Summary | |
---|---|
protected void |
addXWikiApplicationSet(XWikiApplication rootApplication,
Collection<XWikiApplication> applicationList,
boolean recurse,
XWikiContext context)
Add all applications on which current application depend. |
boolean |
equals(Object object)
|
String |
getAppAuthors()
|
List<String> |
getApplications()
|
String |
getAppName()
|
String |
getAppPrettyName()
|
String |
getAppVersion()
|
List<String> |
getDependencies()
|
String |
getDescription()
|
Set<String> |
getDocsNameToInclude(boolean recurse)
Get and resolve all documents names to include application contains. |
static Set<String> |
getDocsNameToInclude(Collection<XWikiApplication> applications)
Get and resolve all documents names to include applications XWikiApplication list contains. |
Set<String> |
getDocsNameToLink(boolean recurse)
Get and resolve all documents names to link application contains. |
static Set<String> |
getDocsNameToLink(Collection<XWikiApplication> applications)
Get and resolve all documents names to link applications XWikiApplication list contains. |
List<String> |
getDocsToInclude()
|
List<String> |
getDocsToLink()
|
List<String> |
getDocuments()
|
Set<String> |
getDocumentsNames(boolean recurse,
boolean includeAppDesc)
Get and resolve all documents names application contains. |
String |
getLicense()
|
List<String> |
getTranslationDocs()
|
Set<XWikiApplication> |
getXWikiApplicationSet(boolean recurse,
XWikiContext context)
Get set of XWikiApplication containing all applications on which current application depend. |
int |
hashCode()
|
void |
setAppAuthors(String appauthors)
Modify the authors of the application. |
void |
setApplications(List<String> applications)
Modify the list of other applications on which current application depends. |
void |
setAppName(String appname)
Modify the name of the application. |
void |
setAppPrettyName(String appprettyname)
Modify the pratty name of the application. |
void |
setAppVersion(String appversion)
Modify the version of the application. |
void |
setDependencies(List<String> dependencies)
Modify the list of plugins on which application depends. |
void |
setDescription(String description)
Modify the description of the application. |
void |
setDocsToInclude(List<String> docstoinclude)
Modify the list of document application contains that will be included in place of copy from wiki template. |
void |
setDocsToLink(List<String> docstolink)
Modify the list of document application contains that will be included in place of copy from wiki template. |
void |
setDocuments(List<String> documents)
Modify the list of documents application contains. |
void |
setLicense(String license)
Modify the version of the application. |
void |
setTranslationDocs(List<String> translationdocs)
Modify the list of documents containing translations strings. |
String |
toString()
|
Methods inherited from class com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.DefaultXObjectDocument |
---|
delete, getBaseObject, getBooleanValue, getDocumentApi, getIntValue, getLargeStringValue, getListValue, getObjectApi, getObjectId, getStringListValue, getStringValue, getXClassManager, isNew, mergeObject, reload, saveDocument, setBooleanValue, setFullName, setIntValue, setLargeStringValue, setListValue, setStringListValue, setStringValue |
Methods inherited from class com.xpn.xwiki.api.Api |
---|
convert, convert, convert, convertAttachments, getXWikiContext, hasAdminRights, hasProgrammingRights, hasWikiAdminRights |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XWikiApplication(XWikiDocument xdoc, int objectId, XWikiContext context) throws XWikiException
xdoc
- the encapsulated XWikiDocumentobjectId
- the id of the XWiki object included in the document to manage.context
- the XWiki context
XWikiException
- error when:
DefaultXObjectDocument.reload(XWikiContext)
DefaultXObjectDocument.DefaultXObjectDocument(com.xpn.xwiki.plugin.applicationmanager.core.doc.objects.classes.XClassManager,
XWikiDocument, int, XWikiContext)
Method Detail |
---|
public String getAppName()
setAppName(String)
public void setAppName(String appname)
appname
- the new name of the application.getAppName()
public String getAppPrettyName()
setAppPrettyName(String)
public void setAppPrettyName(String appprettyname)
appprettyname
- the new pretty name of the application.getAppPrettyName()
public String getDescription()
setDescription(String)
public void setDescription(String description)
description
- the new description of the application.getDescription()
public String getAppVersion()
setAppVersion(String)
public void setAppVersion(String appversion)
appversion
- the version of the application.getAppVersion()
public String getAppAuthors()
setAppAuthors(String)
public void setAppAuthors(String appauthors)
appauthors
- the authors of the application.getAppAuthors()
public String getLicense()
setLicense(String)
public void setLicense(String license)
license
- the license of the application.getAppVersion()
public List<String> getDependencies()
setDependencies(List)
public void setDependencies(List<String> dependencies)
dependencies
- the new list of plugins on which application depends.getDependencies()
public List<String> getApplications()
public void setApplications(List<String> applications)
applications
- the new list of other applications on which current application depends.getApplications()
public List<String> getDocuments()
getDocumentsNames(boolean, boolean)
.setDocuments(List)
public void setDocuments(List<String> documents)
documents
- the new list of documents application contains.getDocuments()
public List<String> getDocsToInclude()
getDocsNameToInclude(boolean)
.setDocsToInclude(List)
public void setDocsToInclude(List<String> docstoinclude)
docstoinclude
- the new list of document application contains that will be included in place of copy from a
wiki template.getDocsToInclude()
public List<String> getDocsToLink()
getDocsNameToLink(boolean)
.setDocsToLink(List)
public void setDocsToLink(List<String> docstolink)
docstolink
- the new list of document application contains that will be linked in place of copy from a wiki
template.getDocsToLink()
public List<String> getTranslationDocs()
Theses documents are added to XWiki.XWikiPreferences "documentBundles" field at application installation.
public void setTranslationDocs(List<String> translationdocs)
Theses documents are added to XWiki.XWikiPreferences "documentBundles" field at application installation.
translationdocs
- the new list of documents containing translations strings. Theses documents are added to
XWiki.XWikiPreferences "documentBundles" field at application installation.public String toString()
toString
in class Document
public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Document
protected void addXWikiApplicationSet(XWikiApplication rootApplication, Collection<XWikiApplication> applicationList, boolean recurse, XWikiContext context) throws XWikiException
rootApplication
- the root application containing recursively all in applicationList
.applicationList
- the applications.recurse
- if true it add recursively all applications dependencies, if false return only direct
dependencies.context
- the XWiki context.
XWikiException
- error when getting application descriptor document from the database.getApplications()
public Set<XWikiApplication> getXWikiApplicationSet(boolean recurse, XWikiContext context) throws XWikiException
recurse
- if true it add recursively all applications dependencies, if false return only direct
dependencies.context
- the XWiki context.
XWikiException
- error when getting application descriptor document from the database.getApplications()
public Set<String> getDocumentsNames(boolean recurse, boolean includeAppDesc) throws XWikiException
For each of these documents names, if are between "[" and "]", are considered as SQL matching string to use with "like".
recurse
- if true it follow recursively all applications dependencies, if false parse only direct
dependencies.includeAppDesc
- if true application descriptor document names is added to docsNames
.
XWikiException
- error when:
getDocuments()
,
XWikiApplicationClass.FIELD_DOCUMENTS
public Set<String> getDocsNameToInclude(boolean recurse) throws XWikiException
For each of these documents names, if are between "[" and "]", are considered as SQL matching string to use with "like".
recurse
- if true it follow recursively all applications dependencies, if false parse only direct
dependencies.
XWikiException
- error when:
getDocsToInclude()
,
XWikiApplicationClass.FIELD_DOCSTOINCLUDE
public static Set<String> getDocsNameToInclude(Collection<XWikiApplication> applications) throws XWikiException
applications
XWikiApplication list contains.
For each of these documents names, if are between "[" and "]", are considered as SQL matching string to use with "like".
applications
- the applications containing documents names to resolve and add to docsNames
.
applications
contains.
XWikiException
- error when:
getDocsToInclude()
,
XWikiApplicationClass.FIELD_DOCSTOINCLUDE
public Set<String> getDocsNameToLink(boolean recurse) throws XWikiException
For each of these documents names, if are between "[" and "]", are considered as SQL matching string to use with "like".
recurse
- if true it follow recursively all applications dependencies, if false parse only direct
dependencies.
XWikiException
- error when:
getDocsToLink()
,
XWikiApplicationClass.FIELD_DOCSTOLINK
public static Set<String> getDocsNameToLink(Collection<XWikiApplication> applications) throws XWikiException
applications
XWikiApplication list contains.
For each of these documents names, if are between "[" and "]", are considered as SQL matching string to use with "like".
applications
- the applications containing documents names to resolve and add to docsNames
.
applications
contains.
XWikiException
- error when:
getDocsToLink()
,
XWikiApplicationClass.FIELD_DOCSTOLINK
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |