Package com.saperion.ngc.iform
Class IntelligentFormPresenter
- java.lang.Object
-
- com.saperion.ngc.iform.IntelligentFormPresenter
-
-
Constructor Summary
Constructors Constructor Description IntelligentFormPresenter(IntelligentFormView intForm)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description DocumentId
addDocument(java.util.List<FieldResultBean> properties, java.lang.String comment, FolderUploadInfos infos, java.lang.String ddcName)
Adds a new document to the archive.boolean
canEditIndex(ResultProperties props)
Checks if the index of the specified document can be edited.void
createSystemView(java.util.List<com.saperion.intf.SaFieldDescription> list, SysForm.FormType type, java.lang.String ddcName)
Deprecated.useIntelligentFormView.createView(Form)
with system form implementation from package com.saperion.ngc.iform.system instead.void
deleteStoredConfiguration()
Deletes the stored area sizes and result list layouts for this mask.java.util.Set<java.lang.String>
getAclsForUpdating()
Returns a comma-separated acl-string that can be used for updating a document.DocumentArchiveMetaInfo
getArchiveMetaInfo(DocumentId id, boolean currentRevision)
Retrieves the meta information of the document from the archive.com.saperion.intf.DDC
getDdc(java.lang.String ddcName)
Returns the DDC with the specified name.void
getDefinition(java.lang.String ddcName, SysForm.FormType type)
Deprecated.useIntelligentFormView.createView(Form)
with system form implementation from package com.saperion.ngc.iform.system instead.ResultProperties
getDocProperties(DocumentId id)
Reads the properties for the given document.java.util.List<com.saperion.intf.SaFieldDescription>
getFieldDefinitions(java.lang.String ddcName)
Returns the field descriptions for the specified DDC.FolderInfo
getFolderInfos(FolderId folderId)
Retrieves information about the specified folder.int
getInboxId()
com.saperion.ngc.iform.xml.Form
getMaskDefinition(java.lang.String maskName)
int
getNextCounterValue(java.lang.String ddcName, java.lang.String fieldName, java.lang.String dbFieldName)
Deprecated.Counter fields cannot be set by API any more.java.lang.String
getSetting(java.lang.String section, java.lang.String key)
java.util.Map<java.lang.Integer,AreaSize>
loadSizesFromConfig()
Loads the sizes of the forms layout-areas from the configuration.void
storeMaskDefinition(java.lang.String maskName, com.saperion.ngc.iform.xml.Form form)
Deprecated.this method does nothing and will be removed in 8.1void
storeSizesInConfig(java.util.Map<java.lang.Integer,AreaSize> sizes)
Stored the layout of the mask in the configuration.
-
-
-
Constructor Detail
-
IntelligentFormPresenter
public IntelligentFormPresenter(IntelligentFormView intForm)
- Parameters:
intForm
- Form view
-
-
Method Detail
-
getDefinition
@Deprecated public void getDefinition(java.lang.String ddcName, SysForm.FormType type) throws NgcUiException, AuthenticationException
Deprecated.useIntelligentFormView.createView(Form)
with system form implementation from package com.saperion.ngc.iform.system instead. Will be removed with 8.1.- Parameters:
ddcName
- DDC nametype
- Type- Throws:
NgcUiException
- when the form could not be opened due to a system error.AuthenticationException
- when the form could not be opened due to access restrictions.
-
getSetting
public java.lang.String getSetting(java.lang.String section, java.lang.String key) throws NgcUiException, AuthenticationException
- Parameters:
section
- Sectionkey
- Key- Returns:
- Value
- Throws:
NgcUiException
- when the form could not be opened due to a system error.AuthenticationException
- when the form could not be opened due to access restrictions.
-
getMaskDefinition
public com.saperion.ngc.iform.xml.Form getMaskDefinition(java.lang.String maskName) throws NgcUiException, AuthenticationException
- Parameters:
maskName
- Mask name- Returns:
- Form
- Throws:
NgcUiException
- when a mask-definition cannot be loadedAuthenticationException
- authentication exception
-
storeMaskDefinition
@Deprecated public void storeMaskDefinition(java.lang.String maskName, com.saperion.ngc.iform.xml.Form form) throws NgcUiException
Deprecated.this method does nothing and will be removed in 8.1- Parameters:
maskName
- Mask nameform
- Form- Throws:
NgcUiException
- when the form cannot be saved due to an xml error.
-
createSystemView
@Deprecated public void createSystemView(java.util.List<com.saperion.intf.SaFieldDescription> list, SysForm.FormType type, java.lang.String ddcName) throws NgcUiException, AuthenticationException
Deprecated.useIntelligentFormView.createView(Form)
with system form implementation from package com.saperion.ngc.iform.system instead. Will be removed with 8.1.- Parameters:
list
- Field definitionstype
- TypeddcName
- DDC name- Throws:
NgcUiException
- when an error occurred during form-processAuthenticationException
- when the form could not be opened due to access restrictions.
-
getInboxId
public int getInboxId() throws NgcUiException, AuthenticationException
- Returns:
- Inbox id
- Throws:
NgcUiException
- system exceptionAuthenticationException
- when the inbox could not be opened due to access restrictions.
-
canEditIndex
public boolean canEditIndex(ResultProperties props) throws NgcUiException, AuthenticationException
Checks if the index of the specified document can be edited.- Parameters:
props
- document properties- Returns:
- true if editing the index is possible
- Throws:
AuthenticationException
- when the document could not be opened due to access restrictions.NgcUiException
- system error or document identification exception
-
addDocument
public DocumentId addDocument(java.util.List<FieldResultBean> properties, java.lang.String comment, FolderUploadInfos infos, java.lang.String ddcName) throws NgcUiException, AuthenticationException
Adds a new document to the archive.- Parameters:
properties
- meta datacomment
- commentinfos
- upload infosddcName
- DDC name, if folderinfo don't exists.- Returns:
- the ID of the new document
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getAclsForUpdating
public java.util.Set<java.lang.String> getAclsForUpdating() throws NgcUiException, AuthenticationException
Returns a comma-separated acl-string that can be used for updating a document. Depending on theIndexMaskDocument.AclWriteMode
defined inIndexMaskDocument
, the string will contain the new ACLs added by script, the ACLs added by script and the ACLs already added to the document or nothing to clear all ACLs from the document.- Returns:
- comma-separated ACL string
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getNextCounterValue
@Deprecated public int getNextCounterValue(java.lang.String ddcName, java.lang.String fieldName, java.lang.String dbFieldName) throws NgcUiException, AuthenticationException
Deprecated.Counter fields cannot be set by API any more. This method is contained for backwards-compatibility and will be removed in a future version.Returns the next possible value for a counter field.- Parameters:
ddcName
- ddc namefieldName
- counter field namedbFieldName
- counter field database name- Returns:
- counter value
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFolderInfos
public FolderInfo getFolderInfos(FolderId folderId) throws NgcUiException, AuthenticationException
Retrieves information about the specified folder.- Parameters:
folderId
- folder id- Returns:
- folder document info
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
loadSizesFromConfig
public java.util.Map<java.lang.Integer,AreaSize> loadSizesFromConfig() throws NgcUiException, AuthenticationException
Loads the sizes of the forms layout-areas from the configuration.- Returns:
- map with sizes
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
storeSizesInConfig
public void storeSizesInConfig(java.util.Map<java.lang.Integer,AreaSize> sizes) throws NgcUiException, AuthenticationException
Stored the layout of the mask in the configuration.- Parameters:
sizes
- the sizes of the mask's layout areas- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
deleteStoredConfiguration
public void deleteStoredConfiguration() throws NgcUiException, AuthenticationException
Deletes the stored area sizes and result list layouts for this mask.- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getArchiveMetaInfo
public DocumentArchiveMetaInfo getArchiveMetaInfo(DocumentId id, boolean currentRevision) throws NgcUiException, AuthenticationException
Retrieves the meta information of the document from the archive.- Parameters:
id
- the document's idcurrentRevision
- whether to resolve the current revision first or not- Returns:
- meta information from archive
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getFieldDefinitions
public java.util.List<com.saperion.intf.SaFieldDescription> getFieldDefinitions(java.lang.String ddcName) throws NgcUiException, AuthenticationException
Returns the field descriptions for the specified DDC.- Parameters:
ddcName
- name of the ddc- Returns:
- list of field descriptions
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getDdc
public com.saperion.intf.DDC getDdc(java.lang.String ddcName) throws NgcUiException, AuthenticationException
Returns the DDC with the specified name.- Parameters:
ddcName
- the name of the ddc- Returns:
- the DDC
- Throws:
NgcUiException
- exception to be handled by viewAuthenticationException
- re-logon required
-
getDocProperties
public ResultProperties getDocProperties(DocumentId id) throws NgcUiException, AuthenticationException
Reads the properties for the given document.- Parameters:
id
- Document id- Returns:
- Result properties
- Throws:
NgcUiException
- when s system error occurred or user has no permissions to access this document.AuthenticationException
- when user is logged off.
-
-