Interface AdministrativeDomainManager
- All Known Implementing Classes:
StandardAdministrativeDomainManager
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionReturns an enumeration of administrative domain references.Retrieves all domains defined in the system.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref) Changes the domain to which the object belongs and sets domain inheritence to false.changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref, boolean inheritedDomain) Changes the domain to which the object belongs.changeAdministrativeDomain(WTList objs, AdminDomainRef domain_ref, boolean inheritedDomain) Multi-object version of the changeAdministrativeDomain() API.changeAdministrativeDomain(WTList objs, WTList domain_refs, boolean inheritedDomain) Multi-object version of the changeAdministrativeDomain() API.createDomain(AdminDomainRef domainRef, String name, String description, WTContainerRef container_ref) Create an administrative domain with the given name and description in the specified domain and in the specified container.voiddelete(AdminDomainRef domain) Deletes the referenced administrative domain.getAllEvents(Locale locale) Returns the set of all events defined in the system sorted alphabetically.getClassHierarchy(String from_class) Deprecated.getDisplayDomainPath(AdminDomainRef domain_ref) Retrieves the path name in displayable form for an administrative domain given thedomain_ref.Retrieves the path name in displayable form for an administrative domain.Retrieves an administrative domain given its domain name or domain path name.getDomain(String domain_path, WTContainerRef container_ref) Retrieves an administrative domain given its path name within a container.getDomainPath(AdminDomainRef domain_ref) Retrieves the path name in external form for an administrative domain given the domain reference.getDomainPath(AdministrativeDomain domain) Retrieves the path name in external form for the given administrative domain.voidsetAdministratorRule(AdminDomainRef domainRef) Creates an access control rule giving the administrator all the rights in the domain identified by the given domain reference.voidCreates an access control rule giving the administrator all the rights in the given domain.voidsetDomainDescription(AdminDomainRef domainRef, String newDescription) Updates the description of the referenced administrative domain.updateDomain(AdminDomainRef domainRef, String name, String description) Update an administrative domain with the given name and description.
-
Method Details
-
getDomain
Retrieves an administrative domain given its domain name or domain path name. If no such domain is found, null is returned. If an unexpected error condition occurs, an exception is thrown.If no container information is specified within the input domain path (or if only a domain name is provided), a container is derived depending on the input value.
Valid formats for
domain_pathinclude:- domain name (e.g., Design)
- domain path (e.g., /Design, /Marketing/Brochures, etc.)
[container-path]/domain-path(the external form of the domain path)
Resulting actions for the different input formats:
- domain name
If domain name is one of the special domain names configurable viawt.adminproperties in thewt.propertiesfile, the named domain whose parent is the root domain and resides in the Site container is returned. If the domain name is not one of the special domains, the named domain whose parent is the root domain and resides in the Windchill PDM Library container is returned. - domain path
If domain path is the path for one of the special domains (e.g., /System) the special domain whose parent is the root domain and resides in the Site container is returned; otherwise the domain corresponding to the domain path that resides in the Windchill PDM Library container is returned. Note that in this case the domain path must be relative to the Windchill PDM Library container. This means that all domains in the path must reside in the Windchill PDM Library container. - external form of the domain path (
[container-path]/domain-path)
This is the external form of the domain path. For a description of the external form see thegetDomainPathAPIs. In this case, the administrative domain corresponding to thedomain-pathand residing in the container corresponding to thecontainer-pathis returned. Note that thedomain-pathportion must be relative to the container specified by thecontainer-pathportion.
Supported API: true- Parameters:
domain_path- Required. Specifies the administrative domain path or the domain name.- Returns:
- AdministrativeDomain
- Throws:
WTException
-
getDomain
Retrieves an administrative domain given its path name within a container. If no such domain is found, null is returned. If an unexpected error condition occurs, an exception is thrown.
Supported API: true- Parameters:
domain_path- Required. The domain path of the administrative domain. This must be a path name (i.e., it must start with "/"). The domain path is relative to the container specified by thecontainer_refparameter. This means that all of the domains contained in the domain path must reside in the container specified bycontainer_ref.container_ref- Required. The container the domain path is relative to.- Returns:
- AdministrativeDomain
- Throws:
WTException
-
getDomainPath
Retrieves the path name in external form for the given administrative domain. If the administrative domain isn't found, null is returned.To get the domain path name in displayable form use the
getDisplayDomainPathAPI.The format for the external form of the domain path is
[container-path]/domain-path(the brackets are included) wherecontainer-pathis the form/containerType=name/containerType=name/.../containerType=nameFor example:
[/wt.inf.container.OrgContainer=DefaultOrg/wt.inf.library.WTLibrary=Windchill PDM]/DesignSee the
ContainerPath.getExternalForm()API for more information about thecontainer-pathexternal form. Thedomain-pathis relative to the container meaning that all of the domains in the domain path reside in the container. The external form of the domain path can be used as input to thegetDomain(String domain_path)API.
Supported API: true- Parameters:
domain- Required. The administrative domain.- Returns:
- String
- Throws:
WTException
-
getDomainPath
Retrieves the path name in external form for an administrative domain given the domain reference. If the administrative domain isn't found, null is returned. See thegetDomainPath(AdministrativeDomain domain)API for more information.
Supported API: true- Parameters:
domain_ref- Required. The administrative domain reference.- Returns:
- String
- Throws:
WTException
-
getDisplayDomainPath
Retrieves the path name in displayable form for an administrative domain. If the administrative domain isn't found, null is returned.To get the domain path name in external form use the
getDomainPathAPI.The format for the displayable form of the domain path is
container-path /domain-pathwherecontainer-pathis the formcontainerType Name,containerType Name,...,containerType NameFor example:
Site,Organization DefaultOrg,Library Windchill PDM /Marketing/BrochuresSee the
ContainerPath.getDisplayForm()API for more information about thecontainer-pathdisplay form.The
domain-pathis relative to the container meaning that all of the domains in the domain path reside in the container.Note that access control is applied to the domain path before it is returned so if a user isn't allowed to see a portion of the path the String
(Secured information)is inserted in the domain path. For example, from the above example if the user doesn't have access to containerDefaultOrgand domainMarketingthe returned domain path is:
(Secured information),Library Windchill PDM /(Secured information)/Brochures
Supported API: true- Parameters:
domain- Required. The administrative domain.- Returns:
- String
- Throws:
WTException
-
getDisplayDomainPath
Retrieves the path name in displayable form for an administrative domain given thedomain_ref. If the administrative domain isn't found, null is returned. See thegetDisplayDomainPath(AdministrativeDomain domain)API for more information.
Supported API: true- Parameters:
domain_ref- Required. The administrative domain reference.- Returns:
- String
- Throws:
WTException
-
allDomains
Retrieves all domains defined in the system.
Supported API: true- Returns:
- Enumeration
- Throws:
WTException
-
allDomainRefs
Returns an enumeration of administrative domain references.
Supported API: true- Returns:
- EnumeratorVector
- Throws:
WTException
-
getAllEvents
Returns the set of all events defined in the system sorted alphabetically.
Supported API: true- Parameters:
locale-- Returns:
- SortedSet
- Throws:
WTException
-
createDomain
AdminDomainRef createDomain(AdminDomainRef domainRef, String name, String description, WTContainerRef container_ref) throws WTException, WTPropertyVetoException Create an administrative domain with the given name and description in the specified domain and in the specified container. Returns a reference to the new domain.
Supported API: true- Parameters:
domainRef-name-description-container_ref-- Returns:
- AdminDomainRef
- Throws:
WTExceptionWTPropertyVetoException
-
changeAdministrativeDomain
DomainAdministered changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref) throws WTException Changes the domain to which the object belongs and sets domain inheritence to false. PostsPRE_CHANGE_DOMAINandPOST_CHANGE_DOMAINevents. Persists and returns the changed object. Throws anAdministrativeDomainExceptionif the object is not persistent.If
objisIterated, it must be the latest iteration- otherwise a WTException will be thrown.
Supported API: true- Parameters:
obj- A domain administered object. If obj is null, a WTInvalidParameterException is thrown.domain_ref- The new administrative domain reference for the domain administered object. If domain_ref is null, a WTInvalidParameterException is thrown.- Returns:
- DomainAdministered
- Throws:
WTException
-
changeAdministrativeDomain
DomainAdministered changeAdministrativeDomain(DomainAdministered obj, AdminDomainRef domain_ref, boolean inheritedDomain) throws WTException, WTPropertyVetoException Changes the domain to which the object belongs. PostsPRE_CHANGE_DOMAINandPOST_CHANGE_DOMAINevents. Persists and returns the changed object. Throws anAdministrativeDomainExceptionif the object is not persistent.If
objisIterated, it must be the latest iteration- otherwise a WTException will be thrown.
Supported API: true- Parameters:
obj- A domain administered object. If obj is null, a WTInvalidParameterException is thrown.domain_ref- The new administrative domain reference for the domain administered object. If domain_ref is null, a WTInvalidParameterException is thrown.inheritedDomain- Set to true if the domain is inherited, otherwise set to false- Returns:
- DomainAdministered
- Throws:
WTExceptionWTPropertyVetoException
-
changeAdministrativeDomain
WTList changeAdministrativeDomain(WTList objs, AdminDomainRef domain_ref, boolean inheritedDomain) throws WTException, WTPropertyVetoException Multi-object version of the changeAdministrativeDomain() API. For eachDomainAdministeredobject in theobjscollection, the domain reference for the domain to which the object belongs is changed to the domain reference specified by thedomain_refparameter.The
objscollection must contain one or moreDomainAdministeredobjects. The exception is if you want to change the domain that anAdministrativeDomainobject belong to. In this case theobjscollection can contain only oneDomainAdministeredobject which is theAdministrativeDomainobject being modified.If
objsincludes any non-latestIteratedobjects, a WTException will be thrown.Multi-object
PRE_CHANGE_DOMAINandPOST_CHANGE_DOMAINevents are posted before and after changing theDomainAdministeredobjects in theobjscollection.The domain changes for each
DomainAdministeredobject in theobjscollection are persisted and a collection of the modifiedDomainAdministeredobjects is returned.If any of the
DomainAdministeredobjects in theobjscollection are not persistent, anAdministrativeDomainExceptionis thrown.
Supported API: true- Parameters:
objs- Collection ofDomainAdministeredobjects to be changed. If objs is null or empty, a WTInvalidParameterException is thrown.domain_ref- The newAdminDomainRefto be assigned to each of theDomainAdministeredobjects in the objs collection. If domain_ref is null, a WTInvalidParameterException is thrown.inheritedDomain- Set to true if the domain is inherited; otherwise, set to false- Returns:
- WTList
- Throws:
WTExceptionWTPropertyVetoException
-
changeAdministrativeDomain
WTList changeAdministrativeDomain(WTList objs, WTList domain_refs, boolean inheritedDomain) throws WTException, WTPropertyVetoException Multi-object version of the changeAdministrativeDomain() API. For eachDomainAdministeredobject in theobjscollection, the domain reference for the domain to which the object belongs is changed to the domain reference specified by the correspondingAdminDomainRefobject in thedomain_refscollection.The
objscollection must contain one or moreDomainAdministeredobjects. The exception is if you want to modify the domain that anAdministrativeDomainobject belongs to. In this case theobjscollection can contain only oneDomainAdministeredobject which is theAdministrativeDomainobject being modified. If objs contains multiple objects and one or more of them is an AdministrativeDomain, a AdministrativeDomainException is thrown. If objs is null or empty, a WTInvalidParameterException is thrown.The
domain_refscollection must contain either 1) a singleAdminDomainRefobject or 2) the same number ofAdminDomainRefobjects as there areDomainAdministeredobjects in theobjscollection. Ifdomain_refscontains oneAdminDomainRef, thisAdminDomainRefis assigned to eachDomainAdministeredobject in theobjscollection; otherwise, the firstAdminDomainRefis assigned to the firstDomainAdministeredobject, the secondAdminDomainRefis assigned to the secondDomainAdministeredobject, and so on. If domain_refs is null, empty, or the wrong size, a WTInvalidParameterException is thrown.Multi-object
PRE_CHANGE_DOMAINandPOST_CHANGE_DOMAINevents are posted before and after changing theDomainAdministeredobjects in theobjscollection.Any
Iteratedobjects inobjsmust be the lastest iterations- otherwise a WTException will be thrown.The domain changes for each
DomainAdministeredobject in theobjscollection are persisted and a collection of the modifiedDomainAdministeredobjects is returned.If any of the
DomainAdministeredobjects in theobjscollection are not persistent, anAdministrativeDomainExceptionis thrown.
Supported API: true- Parameters:
objs- Collection ofDomainAdministeredobjects to be changed.domain_refs- A collection of the newAdminDomainRefobjects to be assigned to the correspondingDomainAdministeredobjects in the objs collection.inheritedDomain- Set to true if the domain is inherited; otherwise, set to false- Returns:
- WTList
- Throws:
WTExceptionWTPropertyVetoException
-
delete
Deletes the referenced administrative domain. A domain cannot be deleted if it is referenced by other objects (for example, it has children or associated policy rules).
Supported API: true- Parameters:
domain-- Throws:
WTException
-
getClassHierarchy
Deprecated.Returns the class hierarchy that extends (or implements) the class (or interface) passed as parameter. The hierarchy is returned in the form of a Hashtable, where the keys are the classes that extend (implement) the argument class and the values are vectors of names of the classes that extend the class in the key. All names of the classes are full qualified.Normally only concrete classes plus
wt.fc.WTObjectare returned. A list of abstract classes (that implementfrom_class) may be included by setting the propertywt.admin.hierarchyListAdditions.=class1,class2,... Deprecated. Use introspection methods defined by the TypeModel (package com.ptc.core.meta.type.runtime.server) to get a type hierarchy.
Supported API: true- Parameters:
from_class-- Returns:
- Hashtable
- Throws:
WTException
-
setAdministratorRule
Creates an access control rule giving the administrator all the rights in the given domain.
Supported API: true- Parameters:
domain-- Throws:
WTException
-
setAdministratorRule
Creates an access control rule giving the administrator all the rights in the domain identified by the given domain reference.
Supported API: true- Parameters:
domainRef-- Throws:
WTException
-
setDomainDescription
void setDomainDescription(AdminDomainRef domainRef, String newDescription) throws WTException, WTPropertyVetoException Updates the description of the referenced administrative domain.
Supported API: true- Parameters:
domainRef-newDescription-- Throws:
WTExceptionWTPropertyVetoException
-
updateDomain
AdminDomainRef updateDomain(AdminDomainRef domainRef, String name, String description) throws WTException, WTPropertyVetoException Update an administrative domain with the given name and description.
Supported API: true- Parameters:
domainRef- Domain reference of the domain to updatename- new domain namedescription- new domain description- Returns:
- AdminDomainRef
- Throws:
WTExceptionWTPropertyVetoException
-