Class ecm.model.Teamspace


Extends ecm.model._ModelObject, ecm.model._OpenedSearchesMixin, ecm.model._RecentSearchesMixin.
Represents a teamspace that is stored in a repository.
Defined in: <ecm\model\Teamspace.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
ecm.model.Teamspace(properties)
Constructor

Field Summary

Field Attributes Field Name and Description
 
Sets the name of the repository class defining this teamspace.
 
An array of column property definitions, this defines what properties to show in browse.
 
An array of ecm.model.ContentClass objects associated with this teamspace.
 
An array of user privilege objects
 
Sets the default class id for the teamspace.
 
Sets the default entry template Id for the teamspace.
 
desc 
The description for this teamspace or teamspace template.
 
An array of ecm.model.EntryTemplate objects associated with this teamspace.
 
Sets the teamspace folder structure meta data from the template.
 
The last modified time.
 
The name of the user that last modified the teamspace.
 
The user information for the last modified user (P8 only).
 
An array of the teamspace members.
 
An array of opened searches
 
An array of ecm.model.Permission objects
 
 
roles 
An array of ecm.model.Role objects associated with this teamspace.
 
An array of ecm.model.SearchTemplate objects associated with the teamspace.
 
state 
A string value hold the state of the teamspace.
 
team 
An array of teamspace members, can be ecm.model.User or ecm.model.UserGroup objects
 
type 
The teamspace type.
 
A boolean value indicating if the teamspace supports classes.

Method Summary

Method Attributes Method Name and Description
 
addSearchTemplate(searchTemplate, callback)
Add a search tempalte to this teamspace
 
 
Returns a clone of this teamspace
 
createFromTemplateJson(jsonTeamspaceString)
Build this teamspace object from a JSON string.
 
getDisplayValue(attribute)
Returns the attribute value in a format that can be displayed in the user interface.
 
getPrivilege(privilege)
Returns the specified privilege.
 
Returns the State icon CSS class for that specified state
 
Returns state message for the teamspace.
 
getTeamMemberById(shortName)
Retrieves a teamspace member by short name.
 
getValue(attribute)
Returns the value of an attribute.
 
hasPrivilege(privilege)
Returns true if the item has the specified privilege.
 
 
onNameChange(modelObject)
This event is invoked whenever the object or a child object of this object changes value.
 
An event function called when the search templates have been retrieved
 
onSearchTemplateAdded(searchTemplate)
An event function called when the search template has been added
 
onSearchTemplateDeleted(searchTemplateId)
An event function called when the search template has been deleted
 
An event function called when the search template folders have been retrieved
 
An event function called when the user privileges have been retrieved
 
Clears all values except for type from the model.
 
Retrieve the repository item representing the folder object used as the base folder for this teamspace.
 
Retrieve the content classes for this teamspace
 
Retrieve the search template folders for this teamspace
 
retrieveSearchTemplates(callback, filter)
Retrieve the search templates for this teamspace
 
retrieveUserPrivileges(callback, params)
Retrieve the user privileges.
 
scheduleTeamspaceDeletionTask(handlerClassName, taskParams)
Schedules a task to peform team deletion.
 
searchTemplatesDeleted(searchTemplates)
Delete the list of search templates from the teamspace.
 
Returns a JSON string representation of this teamspace that can be stored in the repository as a teamspace template.

Constructor Detail

ecm.model.Teamspace(properties)

Constructor
Parameters:
properties
The properties for the model object. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.

Field Detail

className

Sets the name of the repository class defining this teamspace.

columnProperties

An array of column property definitions, this defines what properties to show in browse.

contentClasses

An array of ecm.model.ContentClass objects associated with this teamspace.

currentUserPrivileges

An array of user privilege objects

defaultClass

Sets the default class id for the teamspace.

defaultEntryTemplate

Sets the default entry template Id for the teamspace.

desc

The description for this teamspace or teamspace template.

entryTemplates

An array of ecm.model.EntryTemplate objects associated with this teamspace.

folders

Sets the teamspace folder structure meta data from the template.

lastModified

The last modified time.

lastModifiedUser

The name of the user that last modified the teamspace.

lastModifiedUserInfo

The user information for the last modified user (P8 only).
Since:
2.0.3

members

An array of the teamspace members.

openedSearches

An array of opened searches

permissions

An array of ecm.model.Permission objects

repository

A ecm.model.Repository object

roles

An array of ecm.model.Role objects associated with this teamspace.

searchTemplates

An array of ecm.model.SearchTemplate objects associated with the teamspace.

state

A string value hold the state of the teamspace.

team

An array of teamspace members, can be ecm.model.User or ecm.model.UserGroup objects

type

The teamspace type. Set to "instance" for an instance of a teamspace. Set the teamspace type to "template" for a teamspace template.

usesClasses

A boolean value indicating if the teamspace supports classes. A value of false indicates that it supports entry templates.

Method Detail

addSearchTemplate(searchTemplate, callback)

Add a search tempalte to this teamspace
Parameters:
searchTemplate
A ecm.model.SearchTemplate object to add
callback
A callback funcation called after the search tempalte has been added. Passed a ecm.model.SearchTemplate object as a parameter.

clearSearchTemplates()


clone()

Returns a clone of this teamspace
Since:
2.0.3.3

createFromTemplateJson(jsonTeamspaceString)

Build this teamspace object from a JSON string.
Parameters:
jsonTeamspaceString
A JSON string for a teamspace template.

getDisplayValue(attribute)

Returns the attribute value in a format that can be displayed in the user interface.
Parameters:
attribute
The name of the attribute.

getPrivilege(privilege)

Returns the specified privilege.
Parameters:
privilege
The identifier of the privilege to retrieve.

getStateClass(state)

Returns the State icon CSS class for that specified state
Parameters:
state

getStateMessage()

Returns state message for the teamspace.
Since:
2.0.3

getTeamMemberById(shortName)

Retrieves a teamspace member by short name.
Parameters:
shortName
shortName of the member to retrieve.
Since:
2.0.3

getValue(attribute)

Returns the value of an attribute.
Parameters:
attribute
The attribute identifier.

hasPrivilege(privilege)

Returns true if the item has the specified privilege.
Parameters:
privilege
The identifier of the privilege to test.

initFromJson()


onNameChange(modelObject)

This event is invoked whenever the object or a child object of this object changes value.
Parameters:
modelObject
Either this object or the child object that has changed.

onRetrieveSearchTemplatesCompleted(searchTemplates)

An event function called when the search templates have been retrieved
Parameters:
searchTemplates

onSearchTemplateAdded(searchTemplate)

An event function called when the search template has been added
Parameters:
searchTemplate

onSearchTemplateDeleted(searchTemplateId)

An event function called when the search template has been deleted
Parameters:
searchTemplateId

onSearchTemplateFoldersRetrieved(repository)

An event function called when the search template folders have been retrieved
Parameters:
repository

onUserPrivilegesRetrieved()

An event function called when the user privileges have been retrieved

reset()

Clears all values except for type from the model. Also fires onChange event.

retrieveBaseFolder(callback)

Retrieve the repository item representing the folder object used as the base folder for this teamspace.
Parameters:
callback
A callback funcation called after the base folder has been retrieved. Passes a ecm.model.ContentItem as a parameter.

retrieveContentClasses(callback)

Retrieve the content classes for this teamspace
Parameters:
callback
A callback funcation called after the content classes have been retrieved. Passes an array of ecm.model.ContentClass objects as a parameter.

retrieveSearchTemplateFolders(callback)

Retrieve the search template folders for this teamspace
Parameters:
callback
A callback funcation called after the folders have been retrieved. Passes a ecm.model.SearchTemplateFolder object parameter.

retrieveSearchTemplates(callback, filter)

Retrieve the search templates for this teamspace
Parameters:
callback
A callback funcation called after the search templates have been retrieved. Passes a ecm.model.SearchTemplate object parameter.
filter

retrieveUserPrivileges(callback, params)

Retrieve the user privileges.
Parameters:
callback
A callback funcation called after the privileges have been retrieved.
params
An object containing parameters to control the request to the server. The following parameters are supported:
  • requestHeaders - Parameters intended for the Request Header. When requestHeaders is provided, the caller is responsible for optionally setting the "Cache-Control" request header, as a default option will not be set. When requestHeaders is not provided, "Cache-Control" "no-cache" is used.
  • cancellable - Flag indicating if the request can be canceled
  • backgroundRequest - Flag indicating if the request should be run in the background.
  • requestFailedCallback - Callback method called when a request returns from the server with errors.

scheduleTeamspaceDeletionTask(handlerClassName, taskParams)

Schedules a task to peform team deletion.
Parameters:
handlerClassName
The handlerClassName of the task that will be scheduled. This is typically the full class path of the task that will be executed.
taskParams
The parameters to be passed in as part of the requestParams for the request. These parameters will be appended to "specificTaskRequest" and will be part of the task's taskInfo object.
Since:
2.0.3

searchTemplatesDeleted(searchTemplates)

Delete the list of search templates from the teamspace.
Parameters:
searchTemplates
An array of ecm.model.SearchTemplate objects to delete

toJson()

Returns a JSON string representation of this teamspace that can be stored in the repository as a teamspace template.