Server tasks

Retrieving Document Types

Example of document type’s path the example presents the class _ResourceDefinitionCollection.

public void library_getResourceDefinitions( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving every Document Types _ResourceDefinitionCollection definitions = module.GetResourceDefinitions( context ); 
        for ( int index = 0 ; index < definitions.getCount() ; index++ ) 
        { 
                IResourceDefinition resourceDefinition = definitions.getItem( index ); 
                LOGGER.info( "resource definition: " + resourceDefinition.getId().getAsString() + ", name: " + resourceDefinition.getname() + ", label: " + resourceDefinition.getlabel() ); 
        } 
}

Retrieving a document type by its system name

Example of retrieving a document type by its system name

public void library_getResourceDefinition( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving a specific document type IResourceDefinition resourceDefinition = module.GetResourceDefinition( context, "Type SDK" );
        LOGGER.info( "resource definition: " + resourceDefinition.getId().getAsString() + ", name: " + resourceDefinition.getname() + ", label: " + resourceDefinition.getlabel() ); 
}

Retrieving the properties of a document type

Example of document type properties path The example presents the class _PropertyCollection.

public void library_getResourceDefinitionProperties( IDocumentManagementModule module, IContext context, IResourceDefinition resourceDefinition ) throws Exception 
{ 
        // retrieving the properties of a document type 
        _PropertyCollection properties = module.GetPropertiesByResourceDefinition( resourceDefinition ); 
        for ( int index = 0 ; index < properties.getCount() ; index++ ) 
        { 
                IProperty property = properties.getItem( index ); 
                LOGGER.info( "property: " + property.getId().getAsString() + ", name: " + property.getname() + ", label: " + property.getlabel() ); 
        } 
}

Retrieving Document templates

Example of document templates path The example presents the class _AttachmentTemplateCollection.

public void library_getAttachementTemplates( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving every Document Templates 
        IAttachmentTemplateCollection attachmentTemplates = module.GetAttachmentTemplates( context ); 
        for ( int index = 0 ; index < attachmentTemplates.getCount() ; index++ ) 
        { 
                IAttachmentTemplate attachmentTemplate = attachmentTemplates.getItem( index ); 
                LOGGER.info( "attachment template: " + attachmentTemplate.getId().getAsString() + ", name: " + attachmentTemplate.getname() ); 
        } 
}

Retrieving a document template by its system name

Retrieving a document template from its system name

public void library_getAttachementTemplate( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving a specific document template 
        IAttachmentTemplate attachmentTemplate = module.GetAttachmentTemplate( context, "Modèle SDK" ); 
        LOGGER.info( "attachment template: " + attachmentTemplate.getId().getAsString() + ", name: " + attachmentTemplate.getname() ); 
}

Retrieving bundle templates

Example of bundle templates path. The example presents the class _BundleDefinitionCollection.

public void library_getBundleDefinitions( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving every bundle Templates 
        IBundleDefinitionCollection definitions = module.GetBundleDefinitions( context ); 
        for ( int index = 0 ; index < definitions.getCount() ; index++ ) 
        { 
                IBundleDefinition bundleDefinition = definitions.getItem( index ); 
                IResourceDefinition resourceDefinition = bundleDefinition.getResourceDefinition(); 
                LOGGER.info( "bundle definition: " + resourceDefinition.getId().getAsString() + ", name: " + resourceDefinition.getname() + ", label: " + resourceDefinition.getlabel() ); 
        } 
 }

Retrieving a bundle template by its system name

Retrieving a bundle template from its system name

public void library_getBundleDefinition( IDocumentManagementModule module, IContext context ) throws Exception 
{ 
        // retrieving a specific bundle template IBundleDefinition bundleDefinition = module.GetBundleDefinition( context, "Bundle SDK" ); 
        IResourceDefinition resourceDefinition = bundleDefinition.getResourceDefinition(); 
        LOGGER.info( "bundle definition: " + resourceDefinition.getId().getAsString() + ", name: " + resourceDefinition.getname() + ", label: " + resourceDefinition.getlabel() ); 
}