com.sapportals.wcm.service.webdav

Interface IWebDAVSiteController


public interface IWebDAVSiteController

Controls the lifecycle (setup, change, teardown) of IWebDAVSites inside a collection.

Collections allowing multiple IWebDAVSites as child resources should support this interface. The caller will invoke the IResource.as(Class) or IResource.isA(Class) methods to test for support and in order to retrieve an instance.

Via this interface the caller can inspect the existing IWebDAVSites, create new ones or tear down existing ones.

If the caller has insufficient access rights, all methods will throw AccessDeniedExceptions, even on non-modifying calls. What the necessary access rights are is handled by the underlying implementation.

Copyright (c) SAP AG 2006


Method Summary
 IWebDAVSite add(IWebDAVSite site, boolean replaceExisting)
          Add a new site with the given settings.
 IWebDAVSite get(String name)
          Get the IWebDAVSite for the given name.
 IWebDAVSite getNewInstance(String name, HttpUrl server)
          Create a new site object with given parameters.
 IWebDAVSite[] getSites()
          Get all sites managed by this controller.
 void remove(String name)
          Remove a site of given name.
 IWebDAVSite update(IWebDAVSite site)
          Update a site with the settings from the given object.
 

Method Detail

get

IWebDAVSite get(String name)
                throws ResourceException
Get the IWebDAVSite for the given name.

Parameters:
name - of site to retrieve
Returns:
site with that name or null
Throws:
ResourceException - on general failures

getSites

IWebDAVSite[] getSites()
                       throws ResourceException
Get all sites managed by this controller. The returned array may be empty but is not null.

Returns:
all sites managed by this controller
Throws:
ResourceException

update

IWebDAVSite update(IWebDAVSite site)
                   throws ResourceException
Update a site with the settings from the given object. This requires that a site exists under the same name. It also means that one cannot change the name of a site with this method.

Parameters:
site - site with parameters for update
Returns:
site object as result of the update
Throws:
ResourceException - on general failure

add

IWebDAVSite add(IWebDAVSite site,
                boolean replaceExisting)
                throws ResourceException
Add a new site with the given settings. If a site under the same name already exists in this controller, the behaviour depends on the second parameter.

replaceExisting=true means that the add behaves as if update was called

replaceExisting=false means that the call will fail and throw a NameAlreadyExistsException

Parameters:
site - to add
replaceExisting - true iff existing sites shall be overwritten
Returns:
newly added site object on success
Throws:
NameAlreadyExistsException - on name collisions
ResourceException - on general failure

remove

void remove(String name)
            throws ResourceException
Remove a site of given name.

Parameters:
name - name of site to remove
Throws:
com.sapportals.wcm.repository.ResourceNotFoundException} - if no site under that name exists
ResourceException - on genernal failure

getNewInstance

IWebDAVSite getNewInstance(String name,
                           HttpUrl server)
                           throws InvalidArgumentException
Create a new site object with given parameters. To actually create such a site, you must call add(IWebDAVSite, boolean) or update(IWebDAVSite).

Parameters:
name - of new site
server - url of server to connect o
Returns:
site object
Throws:
InvalidArgumentException - if parameters are not valid, see also IWebDAVSite for restrictions
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice