public abstract class Type extends NamedCacheRef implements ISecurableContainer
Modifier and Type | Class and Description |
---|---|
static class |
Type.MetaData
server stored meta data available for a Type.
|
static class |
Type.WebCacheType
Base accessor for cached SDK types encapsulating the statefulness of
objects obtained from the artifact cache.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The type name for
Type s. |
Modifier and Type | Method and Description |
---|---|
void |
addFilterQueryListener(IFilterQueryListener listener)
Adds a listener for Filter and/or Query events.
|
void |
addTypeListener(TypeListener listener)
Adds a listener for Type events.
|
Type |
copy()
Creates a copy of a given Type object.
|
void |
discard()
discards local changes made to cached properties
|
void |
discardFiltersAndQueries()
Discards all cached filter and query information associated with this
Type.
|
boolean |
equals(java.lang.Object o)
return true if the two types are equal
|
Catalog |
getCatalog()
Returns a Catalog object for items of this type.
|
int |
getClassID()
Return the class ID for this type.
|
ACE[] |
getComponentACL()
Returns the Access Control List for this type.
|
GUID |
getComponentGUID()
For Types that correspond to StarTeam components this method returns the
server-defined component GUID.
|
java.lang.String |
getDebugString()
Returns a String with debug information about this type.
|
java.lang.String |
getDisplayName()
Returns a display name for this type.
|
Translations |
getDisplayNameTranslations()
Returns a copy of the display name translations for this type.
|
Filter |
getFilter(int ID)
Returns the cached
Filter object belonging to this type with
the specified filter ID. |
Filter |
getFilter(java.lang.String name)
Returns the cached
Filter object belonging to this type with
the specified filter name. |
ACE[] |
getFilterACL()
Returns the Access Control List for filter of this type.
|
Filter[] |
getFilters()
Returns an array of all
Filter s for this type. |
int |
getID()
Return the class ID for this type.
|
java.lang.String |
getName()
Returns the fixed internal name for this type.
|
ISecurableContainer |
getParentContainer()
A Type has no parent container.
|
Property |
getPrimaryDescriptor()
Gets the one and only primary descriptor of this type.
|
PropertyCollection |
getProperties()
Return an array of all
Property objects belonging to this
type. |
Query[] |
getQueries()
Returns an array of all
Query for this type. |
Query |
getQuery(int ID)
Returns the cached
Query object belonging to this type with
the specified Query ID. |
Query |
getQuery(java.lang.String name)
Returns the cached
Query object belonging to this type with
the specified Query name. |
ACE[] |
getQueryACL()
Returns the Access Control List for query of this type.
|
ACE[] |
getRights(Type type)
Returns the Access Control List for items of the specified type for this
type.
|
Property |
getSecondaryDescriptor()
Gets a secondary descriptor of this type.
|
PropertyCollection |
getSecondaryDescriptors()
Return the set of all secondary descriptors for this type Typically, most
types may have at most one secondary descriptor
|
Server |
getServer()
Returns the Server object containing this Type.
|
boolean |
hasFilter(int ID)
Returns true if the cache contains a
Filter with the
provided ID. |
boolean |
hasFilter(java.lang.String name)
Returns true if the cache contains a
Filter with the
provided name. |
int |
hashCode()
return a hash code for this type
|
boolean |
hasPermissions(PermissionCollection permissions)
Returns true if desired permissions are granted for this Type.
|
boolean |
hasPermissions(PermissionCollection permissions,
Type type)
Returns true if desired permissions are granted for items of the
specified type for this type.
|
boolean |
hasQuery(int ID)
Returns true if the cache contains a
Query with the provided
ID. |
boolean |
hasQuery(java.lang.String name)
Returns true if the cache contains a
Query with the provided
name. |
boolean |
isAttachmentContainer()
Returns true if this type can have attachments.
|
boolean |
isBranchable()
Returns true if this type is branchable.
|
boolean |
isComponentType()
Determines whether or not this Type corresponds to a StarTeam
"component".
|
boolean |
isDeleted()
always returns false
|
boolean |
isEqualTo(Type type)
Compares two Type objects.
|
boolean |
isMPXSupported()
Determines whether or not this Type supports MPX.
|
boolean |
isRefreshFiltersAndQueriesRequired()
Returns true if a refreshFiltersAndQueries() operation might have
resulted in Filter or QueryManager information being updated; returns
false if and only if it is known that the Filter and QueryManager
information had not been changed since the last refresh.
|
BooleanProperty |
newBooleanProperty(java.lang.String name)
Create a new Boolean Property Assigns default display names such that
0=False and 1=True.
|
ContentProperty |
newContentProperty(java.lang.String name)
Creates a new ContentProperty.
|
DateProperty |
newDateProperty(java.lang.String name)
Creates a new DateProperty
|
DateTimeProperty |
newDateTimeProperty(java.lang.String name)
Creates a new DateTimeProperty
|
DoubleProperty |
newDoubleProperty(java.lang.String name)
Creates a new DoubleProperty
|
EnumeratedProperty |
newEnumeratedProperty(java.lang.String name,
EnumeratedValue[] values,
boolean isMultiSelectable)
Create a new Enumerated Property
|
IntegerProperty |
newIntegerProperty(java.lang.String name)
Creates a new IntegerProperty
|
LongIntegerProperty |
newLongIntegerProperty(java.lang.String name)
Creates a new LongIntegerProperty
|
MapProperty |
newMapProperty(java.lang.String name)
Creates a new MapProperty.
|
ObjectArrayProperty |
newObjectArrayProperty(java.lang.String name,
Principal.Type typeOfValue)
Creates a new ObjectArrayProperty Throws an IllegalArgumentException for
any typeOfValue other than User or Group
|
ObjectProperty |
newObjectProperty(java.lang.String name,
LiveObject.Type typeOfValue)
Creates a new ObjectProperty
|
BooleanProperty |
newOnOffProperty(java.lang.String name)
Create a new Boolean Property Assigns default display names such that
0=Off and 1=On.
|
TextProperty |
newTextProperty(java.lang.String name)
Creates a new TextProperty
|
TimeSpanProperty |
newTimeSpanProperty(java.lang.String name)
Creates a new TimeSpanProperty
|
BooleanProperty |
newYesNoProperty(java.lang.String name)
Create a new Boolean Property Assigns default display names such that
0=No and 1=Yes.
|
void |
refresh()
Updates cached properties to reflect recent changes made on the server.
|
void |
refreshFiltersAndQueries()
Refreshes cached Filter and QueryManager information to reflect recent
changes to the repository.
|
void |
removeFilterQueryListener(IFilterQueryListener listener)
Removes a listener for Filter and/or QueryManager events.
|
void |
removeTypeListener(TypeListener listener)
Removes a listener for Type events.
|
void |
setComponentACL(ACE[] acl)
Modify the Access Control List for this type.
|
void |
setFilterACL(ACE[] acl)
Modify the Access Control List for filter of this type.
|
void |
setQueryACL(ACE[] acl)
Modify the Access Control List for query of this type.
|
void |
setRights(Type type,
ACE[] acl)
Modifies the Access Control List for items of the specified type for this
type.
|
boolean |
supportsTraceVersioning()
Returns true if this type supports endpoint versioning with traces
This feature was introduced in the 16.2 server
|
java.lang.String |
toString()
Returns a display string for this Type.
|
public static final java.lang.String NAME
Type
s.Type
,
Constant Field Valuespublic boolean isAttachmentContainer()
public boolean isBranchable()
public Property getPrimaryDescriptor()
public Property getSecondaryDescriptor()
public PropertyCollection getSecondaryDescriptors()
public void discardFiltersAndQueries()
Type.refreshFiltersAndQueries()
public boolean supportsTraceVersioning()
public Type copy()
Type.isEqualTo(Type)
public boolean isEqualTo(Type type)
type
- A Type object to be compared with this one.Type.copy()
public Server getServer()
getServer
in interface ISecurableContainer
public Catalog getCatalog()
public java.lang.String getDisplayName()
Type.getName()
,
Type.getDBTableName()
public Translations getDisplayNameTranslations()
public java.lang.String getName()
Server.getTypes().find
.Type.getDisplayName()
public int getClassID()
Type.getID()
public int getID()
getID
in interface ISecurableContainer
Type.getClassID()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the Type to be tested for equalitypublic int hashCode()
hashCode
in class java.lang.Object
public EnumeratedProperty newEnumeratedProperty(java.lang.String name, EnumeratedValue[] values, boolean isMultiSelectable)
name
- - the name of the propertyvalues
- EnumeratedValue[] a default set of enumerated values NULL, or
an empty array for a property with no starting values.isMultiSelectable
- true if more than one enumeration is selectable from the listpublic BooleanProperty newBooleanProperty(java.lang.String name)
name
- - the name of the propertypublic ContentProperty newContentProperty(java.lang.String name)
name
- - the name of the propertypublic BooleanProperty newYesNoProperty(java.lang.String name)
name
- - the name of the propertypublic BooleanProperty newOnOffProperty(java.lang.String name)
name
- - the name of the propertypublic IntegerProperty newIntegerProperty(java.lang.String name)
name
- - the name of the propertypublic DoubleProperty newDoubleProperty(java.lang.String name)
name
- - the name of the propertypublic DateTimeProperty newDateTimeProperty(java.lang.String name)
name
- - the name of the propertypublic DateProperty newDateProperty(java.lang.String name)
name
- - the name of the propertypublic LongIntegerProperty newLongIntegerProperty(java.lang.String name)
name
- - the name of the propertypublic TimeSpanProperty newTimeSpanProperty(java.lang.String name)
name
- - the name of the propertypublic TextProperty newTextProperty(java.lang.String name)
name
- - the name of the propertypublic MapProperty newMapProperty(java.lang.String name)
name
- - the name of the propertypublic ObjectProperty newObjectProperty(java.lang.String name, LiveObject.Type typeOfValue)
name
- - the name of the propertytypeOfValue
- the value type of the new property instancepublic ObjectArrayProperty newObjectArrayProperty(java.lang.String name, Principal.Type typeOfValue)
name
- - the name of the propertytypeOfValue
- the value type of the new property instance (currently User or
Group)public java.lang.String toString()
toString
in class java.lang.Object
public boolean isComponentType()
Type.getComponentGUID()
public boolean isMPXSupported()
public GUID getComponentGUID()
Type.isComponentType()
public PropertyCollection getProperties()
Property
objects belonging to this
type.public void refreshFiltersAndQueries()
public Filter[] getFilters()
Filter
s for this type.Filter
s for this type.Type.refreshFiltersAndQueries()
,
Filter
public boolean hasFilter(java.lang.String name)
Filter
with the
provided name.name
- A filter name.Filter
with the
provided name.Type.refreshFiltersAndQueries()
,
Filter
public Filter getFilter(java.lang.String name)
Filter
object belonging to this type with
the specified filter name. This will not return null, but will throw an
IllegalArgumentException if the filter is not found.name
- A filter name.Filter
object belonging to this type with the
specified filter name.Type.refreshFiltersAndQueries()
,
Filter
public boolean hasFilter(int ID)
Filter
with the
provided ID.ID
- A filter ID.Filter
with the
provided ID.Type.refreshFiltersAndQueries()
,
Filter
public Filter getFilter(int ID)
Filter
object belonging to this type with
the specified filter ID. This will not return null, but will throw an
IllegalArgumentException if the filter is not found.ID
- A filter ID.Filter
object belonging to this type with the
specified filter ID.Type.refreshFiltersAndQueries()
,
Filter
public Query[] getQueries()
Query
for this type.Query
for this type.Type.refreshFiltersAndQueries()
,
Query
public boolean hasQuery(java.lang.String name)
Query
with the provided
name.name
- A QueryManager name.Query
with the provided
name.Type.refreshFiltersAndQueries()
,
Query
public Query getQuery(java.lang.String name)
Query
object belonging to this type with
the specified Query name. This will not return null, but will throw an
IllegalArgumentException if the Query is not found.name
- A QueryManager name.Query
object belonging to this type with the
specified Query name.Type.refreshFiltersAndQueries()
,
Query
public boolean hasQuery(int ID)
Query
with the provided
ID.ID
- A QueryManager ID.Query
with the provided
ID.Type.refreshFiltersAndQueries()
,
Query
public Query getQuery(int ID)
Query
object belonging to this type with
the specified Query ID. This will not return null, but will throw an
IllegalArgumentException if the Query is not found.ID
- A QueryManager ID.Query
object belonging to this type with the
specified Query ID.Type.refreshFiltersAndQueries()
,
Query
public ACE[] getComponentACL()
public void setComponentACL(ACE[] acl)
acl
- the new access control list or null if to be dropped.public ACE[] getFilterACL()
public void setFilterACL(ACE[] acl)
acl
- the new access control list or null if to be dropped.public ACE[] getQueryACL()
public void setQueryACL(ACE[] acl)
acl
- the new access control list or null if to be dropped.public boolean isRefreshFiltersAndQueriesRequired()
Type.refreshFiltersAndQueries()
,
Server.enableMPX()
public void addTypeListener(TypeListener listener)
Event handlers will be triggered whenever this Type is changed on the server.
In order to handle events, an application must enable MPX.
listener
- Application-specific event handler for Type events.TypeListener
,
Type.removeTypeListener(com.starteam.events.TypeListener)
,
Server.enableMPX()
public void removeTypeListener(TypeListener listener)
listener
- Previously-registered event handlers for Type events.TypeListener
,
Type.addTypeListener(com.starteam.events.TypeListener)
public void addFilterQueryListener(IFilterQueryListener listener)
Event handlers will be triggered whenever a Filter or Query of this Type is added, changed or deleted on the server. Note that an application will not receive events for Filters or Queries that the logged-in user does not have permission to access.
In order to handle events, an application must enable MPX.
listener
- Application-specific event handler for Filter and/or
QueryManager events. Any class that implements the
FilterListener or QueryListener interface (or both) is
supported.IFilterQueryListener
,
FilterListener
,
QueryListener
,
Type.removeFilterQueryListener(com.starteam.events.IFilterQueryListener)
,
Server.enableMPX()
public void removeFilterQueryListener(IFilterQueryListener listener)
listener
- Previously-registered event handlers for Filter and/or
QueryManager events.IFilterQueryListener
,
Type.addFilterQueryListener(com.starteam.events.IFilterQueryListener)
public java.lang.String getDebugString()
Type.getDisplayName()
public ISecurableContainer getParentContainer()
getParentContainer
in interface ISecurableContainer
ISecurableContainer
public ACE[] getRights(Type type)
getRights
in interface ISecurableContainer
type
- the name of the type being controlled by the returned ACLACE
,
Type
public void setRights(Type type, ACE[] acl)
setRights
in interface ISecurableContainer
type
- the type being controlled by the returned ACLacl
- the new access control list or null if to be droppedACE
,
Type
public boolean hasPermissions(PermissionCollection permissions)
permissions
- the desired permissionsPermission
public boolean hasPermissions(PermissionCollection permissions, Type type)
hasPermissions
in interface ISecurableContainer
permissions
- the desired permissionstype
- the type for access to be tested onPermission
public void refresh()
public void discard()
public boolean isDeleted()
isDeleted
in interface ISecurableContainer
StarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.