com.ibm.ecm.extension

Class PluginRepositoryType

  1. java.lang.Object
  2. extended bycom.ibm.ecm.extension.PluginRepositoryType

  1. public abstract class PluginRepositoryType
  2. extends java.lang.Object
Provides an abstract class that is extended to create a class defining a custom repository type provided by the plug-in. Additional PluginService classes are implemented to provide the different services of the repository type.

For enterprise content servers providing Content Management Interoperability Services (CMIS), the CMIS repository type can be used to access the server. A plug-in provided repository type can be used to extend IBM Content Navigator to support access other data sources not traditionally considered enterprise content servers.

Note that additional configuration is needed by the Content Navigator administrator to define the actual repository of the plug-in provided repository type and add it to a desktop.

Since:
2.0.3

Constructor Summary

Constructor and Description
PluginRepositoryType()

Method Summary

Modifier and Type Method and Description
  1. java.lang.String
getConfigurationDijitClass()
Returns the name of a Dojo dijit class that provides a configuration interface widget for this repository type.
  1. java.lang.String
getConnectedConfigurationDijitClass()
Returns the name of a Dojo dijit class that provides a configuration interface widget for this repository type.
  1. java.lang.String[]
getGroupNamesForUser(PluginServiceCallbacks callbacks,javax.servlet.http.HttpServletRequest request,PluginRepositoryConnection connection,java.lang.String userid)
Obtain the group membership list for a given user.
  1. java.lang.String
getIconClass()
Returns the style class to use to display an icon for this repository type.
  1. abstract
  2. java.lang.String
getId()
Returns a unique identifier for the repository type.
  1. abstract
  2. java.lang.String
getName(java.util.Locale locale)
Returns a descriptive label for this repository type that is displayed in the IBM Content Navigator administration tool.
  1. java.lang.String
getPluginId()
Returns the identifier of the plug-in that contains this respository type.
  1. java.lang.String
getRepositoryModelClass()
Returns the name of a Dojo class that extends ecm.model.Repository and represents this repository on the client.
  1. JSONObject
getRepositoryPrivileges(PluginServiceCallbacks callbacks,javax.servlet.http.HttpServletRequest request,PluginRepositoryConnection connection)
Obtain privileges for the repository.
  1. abstract
  2. void
logoff(PluginServiceCallbacks callbacks,javax.servlet.http.HttpSession session,PluginRepositoryConnection connection)
Logoff the repository.
  1. abstract
  2. PluginRepositoryConnection
logon(PluginServiceCallbacks callbacks,javax.servlet.http.HttpServletRequest request,java.lang.String userid,java.lang.String password,RepositoryConfig repositoryConfig)
Perform logon to the repository.
  1. abstract
  2. void
performAction(PluginServiceCallbacks callbacks,RepositoryConfig repositoryConfig,java.lang.String action,javax.servlet.http.HttpServletRequest request,javax.servlet.http.HttpServletResponse response)
Performs a repository specific action.
  1. void
setPluginId(java.lang.String pluginId)
For Internal Use Only.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

PluginRepositoryType

  1. public PluginRepositoryType()

Method Detail

getId

  1. public abstract java.lang.String getId( )
Returns a unique identifier for the repository type. This type needs to be unique across all plug-ins and cannot be one of the built-in repository types: cm, od, p8, cmis.

Important: This identifier is used in URLs so it must contain only alphanumeric characters.

Returns:
A String that is used to identify the repository type.

getName

  1. public abstract java.lang.String getName( java.util.Locale locale)
Returns a descriptive label for this repository type that is displayed in the IBM Content Navigator administration tool.
Returns:
A String containing the short description of the repository type.

getIconClass

  1. public java.lang.String getIconClass( )
Returns the style class to use to display an icon for this repository type.
Returns:
A String containing the style class to use.

logon

  1. public abstract PluginRepositoryConnection logon( PluginServiceCallbacks callbacks,
  2. javax.servlet.http.HttpServletRequest request,
  3. java.lang.String userid,
  4. java.lang.String password,
  5. RepositoryConfig repositoryConfig)
  6. throws java.lang.Exception
Perform logon to the repository.
Parameters:
callbacks -
request -
userid -
password -
repositoryConfig -
Returns:
Throws:
java.lang.Exception

getGroupNamesForUser

  1. public java.lang.String[] getGroupNamesForUser( PluginServiceCallbacks callbacks,
  2. javax.servlet.http.HttpServletRequest request,
  3. PluginRepositoryConnection connection,
  4. java.lang.String userid)
  5. throws java.lang.Exception
Obtain the group membership list for a given user. This is an optional method used for desktop access control validation.
Parameters:
callbacks -
request -
connection -
Returns:
A String array containing the list of group names.
Throws:
java.lang.Exception

getRepositoryPrivileges

  1. public JSONObject getRepositoryPrivileges( PluginServiceCallbacks callbacks,
  2. javax.servlet.http.HttpServletRequest request,
  3. PluginRepositoryConnection connection)
  4. throws PluginRepositoryLogonException
Obtain privileges for the repository. The default implementation will return default privileges.
Parameters:
callbacks -
request -
connection -
Returns:
a JSONObject instance with the following keys and boolean true/false values:
  • priv_foldering -- indicates foldering is supported. The default is true.
  • priv_addItem -- indicates items (folders, docs, other items) can be added. The default is false.
  • priv_addDoc -- indicates that documents can be added. The default is false.
  • searchTemplateSupported -- indicates that searching with search templates is supported. The default is true.
  • priv_addSearch -- indicates search templates can be created and added. The default is false.
  • priv_addTeamspace -- indicates that teamspaces can be created. The default is false.
  • priv_addTeamspaceTemplate -- indicates that teamspace templates can be created. The default is false.
Throws:
PluginRepositoryLogonException - for any situation where the logon is not successful

logoff

  1. public abstract void logoff(PluginServiceCallbacks callbacks,
  2. javax.servlet.http.HttpSession session,
  3. PluginRepositoryConnection connection)
  4. throws java.lang.Exception
Logoff the repository.
Parameters:
callbacks - An instance of the PluginServiceCallbacks class that contains several functions that can be used by the service. These functions provide access to the plug-in configuration and content server APIs.
session - The HttpSession for the user. (Since logoff can be called as part of session invalidation, a request may not exist.)
connection - The instance of PluginRepositoryConnection that was originally returned from PluginRepositoryType.logon.
Throws:
java.lang.Exception

performAction

  1. public abstract void performAction( PluginServiceCallbacks callbacks,
  2. RepositoryConfig repositoryConfig,
  3. java.lang.String action,
  4. javax.servlet.http.HttpServletRequest request,
  5. javax.servlet.http.HttpServletResponse response)
  6. throws java.lang.Exception
Performs a repository specific action.
Parameters:
callbacks - An instance of the PluginServiceCallbacks class that contains several functions that can be used by the service. These functions provide access to the plug-in configuration and content server APIs.
request - The HttpServletRequest object that provides the request. The service can access the invocation parameters from the request.
response - The HttpServletResponse object for the request. The service can get the output stream and write the response. In most cases the response will be in JSON format. Use the PluginServiceCallbacks.writeJSONResponse method to send the response back in such cases as this will allow other plug-ins such as EDSPlugin to process the response.
Throws:
java.lang.Exception - For exceptions that occur when the service is running. If the logging level is high enough to log errors, information about the exception is logged by IBM Content Navigator.

getConfigurationDijitClass

  1. public java.lang.String getConfigurationDijitClass( )
Returns the name of a Dojo dijit class that provides a configuration interface widget for this repository type. The widget must extend the ecm.widget.admin.PluginRepositoryConfigurationPane widget. An instance of the widget is created and displayed in the IBM Content Navigator administration tool for the general repository configuration. General repository configuration does not require connection to the repository and typically provides a URL and other parameters needed to successfully connect to the repository, with the user only needing to provide userid and password.

Refer to the documentation on PluginRepositoryConfigurationPane for more information on what is required for a plug-in repository configuration user interface.


getConnectedConfigurationDijitClass

  1. public java.lang.String getConnectedConfigurationDijitClass( )
Returns the name of a Dojo dijit class that provides a configuration interface widget for this repository type. The widget must extend the ecm.widget.admin.PluginRepositoryConfigurationPane widget. An instance of the widget is created and displayed in the IBM Content Navigator administration tool for the configuration parameters tab of the repository configuration. This tab is enabled after the administrator has filled in the general configuration and logged into the repository.

Refer to the documentation on PluginRepositoryConfigurationPane for more information on what is required for a plug-in repository configuration user interface.


getRepositoryModelClass

  1. public java.lang.String getRepositoryModelClass( )
Returns the name of a Dojo class that extends ecm.model.Repository and represents this repository on the client. This allows the plugin to provide custom behavior at the model layer for the repository.
Returns:
The name of a dojo class, or null for the base model class, ecm.model.Repository

getPluginId

  1. public final java.lang.String getPluginId( )
Returns the identifier of the plug-in that contains this respository type.

Important: This method is implemented by IBM Content Navigator and must not be overridden.

Returns:
An instance of the Plugin class for the plug-in.

setPluginId

  1. public final void setPluginId(java.lang.String pluginId)
For Internal Use Only. Sets the identifier of the plug-in that contains this repository type.