|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.runtime.PlatformObject
org.nuxeo.core.resources.model.impl.SiteResource
public abstract class SiteResource
Abstract implementation of a site resource
| Field Summary |
|---|
| Fields inherited from interface org.nuxeo.core.resources.model.ISiteResource |
|---|
FILE, FOLDER, SITE |
| Constructor Summary | |
|---|---|
SiteResource(ISite site,
java.lang.String path)
|
|
| Method Summary | |
|---|---|
abstract boolean |
accept(ISiteResourceVisitor visitor,
java.lang.Object context)
Accept a visitor on this node of the resource tree |
void |
create(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
Create the resource underlying object using the given metadata and content. |
void |
delete(org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
Delete the underlying object if any from its store |
void |
edit(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
Create or modify the resource by replacing it's metadata with the given one and optionally setting its content. |
boolean |
exists()
Check whether the object underlying this handle is existing or not |
IContentSource |
getContents(org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
Get the contents under this resource. |
ISiteController |
getController()
|
IResourceMetadata |
getMetadata()
Get the resource metadata. |
java.lang.String |
getName()
Get the local name of the resource in its parent. |
ISiteFolder |
getParent()
Get the parent resource. |
java.lang.String |
getPath()
The path of the resource relative to the owner site |
ISite |
getSite()
Get the owner site. |
abstract int |
getType()
Get the resource type. |
java.lang.String |
getURI()
Get the Unique resource identifier |
void |
modify(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
Modify an existing resource. |
| Methods inherited from class org.eclipse.core.runtime.PlatformObject |
|---|
getAdapter |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.core.runtime.IAdaptable |
|---|
getAdapter |
| Constructor Detail |
|---|
public SiteResource(ISite site,
java.lang.String path)
| Method Detail |
|---|
public ISite getSite()
ISiteResource
getSite in interface ISiteResourcepublic ISiteController getController()
public java.lang.String getPath()
ISiteResource
getPath in interface ISiteResourcepublic abstract int getType()
ISiteResource
getType in interface ISiteResource
public abstract boolean accept(ISiteResourceVisitor visitor,
java.lang.Object context)
ISiteResource
accept in interface ISiteResourcevisitor - the visitorcontext - a context object to be used by the visitor or null
public boolean exists()
throws org.eclipse.core.runtime.CoreException
ISiteResource
exists in interface ISiteResourceorg.eclipse.core.runtime.CoreException - if an error occurs
public IResourceMetadata getMetadata()
throws org.eclipse.core.runtime.CoreException
ISiteResource
getMetadata in interface ISiteResourceorg.eclipse.core.runtime.CoreException - if an error occurs
public IContentSource getContents(org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
throws org.eclipse.core.runtime.CoreException
ISiteResource
getContents in interface ISiteResourcemonitor - the progress monitor to use or null if no monitoring is requiredflags - the ISiteOperation flags to use.
org.eclipse.core.runtime.CoreException - if an exception occurs
public void delete(org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
throws org.eclipse.core.runtime.CoreException
ISiteResource
delete in interface ISiteResourcemonitor - the progress monitor to use or null if no ptogress monitoring is requiredflags - the ISiteOperation flags to use.
org.eclipse.core.runtime.CoreException - if the underling object is not existing or other error occured
public void create(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
throws org.eclipse.core.runtime.CoreException
ISiteResource
create in interface ISiteResourcemetadata - the resource metadata.content - the content to set if any or null otherwisemonitor - a progress monitor if progress monitoring is required or null otherwiseflags - the ISiteOperation flags to use.
org.eclipse.core.runtime.CoreException - if an error occurs or the resource is already existing
public void modify(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
throws org.eclipse.core.runtime.CoreException
ISiteResourceBe warned that doing a modify operation may change the resource type (for ex. from file to folder) so be carefull to recreate the resource instance if needed
modify in interface ISiteResourcemetadata - the resource metadata. If null metadata is not changedcontent - the content to set if any or null otherwisemonitor - a progress monitor if progress monitoring is required or null otherwiseflags - the ISiteOperation flags to use.
org.eclipse.core.runtime.CoreException - if an exception occurs or if the resource is not existing
public void edit(IResourceMetadata metadata,
IContentSource content,
org.eclipse.core.runtime.IProgressMonitor monitor,
int flags)
throws org.eclipse.core.runtime.CoreException
ISiteResource
If the resource is not existing the resource will be created - in this case the
function is behaving exactly like
ISiteResource.create(IResourceMetadata, IContentSource, IProgressMonitor, int)
so any restricitons applying to this functions applies here too.
If the resource is existing the function will modify it - in
this case the fucntion behaves exactly like the
ISiteResource.modify(IResourceMetadata, IContentSource, IProgressMonitor, int)
so any restriction applying to this function applies here too.
edit in interface ISiteResourcemetadata - the metadata to setcontent - the content to set if any or null otherwisemonitor - the progress monitor or null if no progress monitoring is requiredflags - the ISiteOperation flags to use.
org.eclipse.core.runtime.CoreException - if an exception occurspublic java.lang.String getURI()
ISiteResource
getURI in interface ISiteResourcepublic java.lang.String getName()
ISiteResource
getName in interface ISiteResourcepublic ISiteFolder getParent()
ISiteResource
getParent in interface ISiteResource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||