VDoc lets the integrators to define the parameters for the specific development on the server, organization or application levels.
public void catalog_useConfiguration( ICatalog catalog )
{
// retrieving the configuration from an application
IConfiguration configuration = catalog.getConfiguration();
}
From a configuration object, you may recover the standard parameters by using the methods getProperty() or getProperties().
The interface com.axemble.vdp.configuration.interfaces.ConfigurationParameters defines a certain number of key words that permits to retrieve server information.
List of available key words:
Key word | Description |
SMTP_SERVER | SMTP_SERVER SMTP server address |
SMTP_ENCODING | Encoding used by the SMTP server |
MAIL_BASE_URL | Base URL for the links contained in the e-mails |
MAX_FILE_SIZE | File maximum size |
SUPPORTED_LANGUAGES | Supported languages |
DEFAULT_LANGUAGE | Default language |
ADMIN_EMAIL | Messaging address of the administrator account |
DEFAULT_EMAIL_SENDER | Messaging address of the default sender account |
SUPPORTED_FILE_EXTENSIONS | File extensions supported by the downloading |
XLS_DATE_FORMAT | Date format for Excel documents |
DEFAULT_MIN_DATE | Date fields minimum limit |
DEFAULT_MAX_DATE | Date fields maximum limit |
The following example indicates how to recover, from the server parameters,the default sender messaging address.
public void catalog_getProperty( IConfiguration configuration )
{
// retrieving the default sender
String emailSender = configuration.getProperty( ConfigurationParameters.DEFAULT_EMAIL_SENDER );
System.out.println( "Default email sender" + defaultEmailSender );
}
From a configuration object, you may recover the "user" parameters by using the methods getUserProperty() or getUserProperties().
public void catalog_getUserProperty( IConfiguration configuration )
{
// retrieving the user parameters
String anyParameterValue = configuration.getUserProperty( "any.parameter" );
String anotherParameterValue = configuration.getUserProperty( "another.parameter" );
System.out.println( "any.parameter : " + anyParameterValue );
System.out.println( "another.parameter : " + anotherParameterValue );
}
From a ICatalog object, you may recover a role or every roles of an application.
public void catalog_useRoles( ICatalog catalog )
{
// retrieving the group of roles from an application
Collection roles = catalog.getRoles();
for ( Iterator iterRole = roles.iterator() ; iterRole.hasNext() ; )
{
IRole role = (IRole)iterRole.next();
System.out.println( role.getLabel() + " [" + role.getName() + "]" );
}
}
From a ICatalog object, you may recover the lists of an application.
public void catalog_useLists( ICatalog catalog )
{
// retrieving the group of lists from an application
Collection lists = catalog.getLists();
for ( Iterator iterList = lists.iterator() ; iterList.hasNext() ; )
{
IList list = (IList)iterList.next();
if ( list instanceof IStringList )
{
IStringList stringList = (IStringList)list;
System.out.println( stringList.getLabel() + " [" + stringList.getName() + "]" );
for ( Iterator iterValue = stringList.getValues().iterator() ; iterValue.hasNext() ; )
{
String stringListElement = (String)iterValue.next();
System.out.println( stringListElement );
}
}
else if ( list instanceof IXmlList )
{}
}
}
From a ICatalog object, you may recover every process versions. The following example shows how to recover a particular version from its system name.
public void catalog_getWorkflow( IContext context, IWorkflowModule workflowModule, ICatalog catalog ) throws WorkflowModuleException
{
IWorkflow workflow = workflowModule.getWorkflow( context, catalog, "documentManagement_1.0" );
}