Package com.documentum.fc.client.search
Interface IDfSmartList
- All Superinterfaces:
IDfPersistentObject
,IDfSysObject
,IDfTypedObject
An IDfSmartList is the BOF object representing a saved search.
This interface provides access to smart list-related data stored in dm_smart_list objects.
Here is an example of how to create an IDfSmartList:
This interface provides access to smart list-related data stored in dm_smart_list objects.
Here is an example of how to create an IDfSmartList:
IDfClient localClient = DfClient.getLocalClient(); IDfSessionManager sessionManager = localClient.newSessionManager(); // Setup session information // ... // Obtain a query manager that will be used to create query definitions IDfSearchService searchService = localClient.newSearchService(sessionManager, "MYDOCBASE"); IDfQueryManager queryManager = searchService.newQueryMgr(); // Build the query IDfQueryBuilder queryBuilder = queryManager.newQueryBuilder(); // Set the type to search queryBuilder.setObjectType("dm_document"); // Set the docbase and folder location queryBuilder.addSelectedSource("MYDOCBASE"); queryBuilder.addLocationScope("MYDOCBASE", "/MyFolder", true); // Set the search constraints IDfExpressionSet searchExpression = queryBuilder.getRootExpressionSet(); searchExpression.addFullTextExpression("test"); searchExpression.addSimpleAttrExpression("title", IDfAttr.DM_STRING, IDfSearchOperation.SEARCH_OP_CONTAINS, false, false, "mytitle"); // Create an IDfSmartListDefinition (query + custom properties), the definition to be stored in the docbase IDfSmartListDefinition definition = queryManager.newSmartListDefinition(); definition.setQueryDefinition(queryBuilder); // Create the persistent object IDfSession session = sessionManager.getSession("MYDOCBASE"); IDfSmartList smartList = (IDfSmartList) session.newObject("dm_smart_list"); // Store the definition smartList.setSmartListDefinition(definition); smartList.save(); sessionManager.release(session);Alternatively, you can also use IDfSearchStoreService to create IDfSmartList objects.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Specific attribute : has_results.static final String
Specific attribute : query_type.static final String
Specific attribute : results_count.static final String
Specific attribute : selected_sources.static final String
Possible smartlist content : dm_internal.static final String
Smartlist type : passthrough_query.static final String
Smartlist type : query_builder.static final String
Smartlist type : unknow.Fields inherited from interface com.documentum.fc.client.IDfPersistentObject
CURRENCY_CHECK_ALWAYS, CURRENCY_CHECK_FIRST_ACCESS, CURRENCY_CHECK_NEVER, CURRENCY_CHECK_ONCE_PER_SCOPE
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether results are saved or not with the search.Gets the Query definition type.Gets the IDfQueryStatus.int
Gets the number of results for the search.Gets the IDfResultsSet.getSmartListDefinition
(IDfSearchService searchService) Gets the IDfSmartListDefinition associated to this dm_smart_list.boolean
isLegacy()
Indicates whether this smart list is an old format.Stores this search.void
setQueryStatus
(IDfQueryStatus queryStatus) Sets the IDfQueryStatus.void
setResultsSaved
(boolean areResultsSaved) Sets if results are saved or not into the object.void
setResultsSet
(IDfResultsSet resultSet) Sets the IDfResultsSet.void
setSmartListDefinition
(IDfSmartListDefinition smartList) Sets the content of this dm_smart_list.Methods inherited from interface com.documentum.fc.client.IDfPersistentObject
addChildRelative, addParentRelative, apiExec, apiGet, apiSet, destroy, fetch, fetchWithCaching, getAttrAssistance, getAttrAssistanceWithValues, getAttrAsstDependencies, getChildRelatives, getParentRelatives, getPartition, getType, getValidator, getVStamp, getWidgetType, isDeleted, isDirty, isInstanceOf, isNew, isReplica, lock, lockEx, registerEvent, removeChildRelative, removeParentRelative, revert, save, setPartition, signoff, unRegisterEvent, unRegisterEventEx, validateAllRules, validateAttrRules, validateAttrRulesWithValue, validateAttrRulesWithValues, validateObjRules, validateObjRulesWithValues
Methods inherited from interface com.documentum.fc.client.IDfSysObject
addDigitalSignature, addESignature, addNote, addReference, addRendition, addRenditionEx, addRenditionEx2, addRenditionEx3, appendContent, appendContentEx, appendFile, appendFileEx, appendPart, areAttributesModifiable, assemble, asVirtualDocument, attachPolicy, bindFile, branch, cancelCheckout, cancelCheckoutEx, cancelScheduledDemote, cancelScheduledPromote, cancelScheduledResume, cancelScheduledSuspend, canDemote, canPromote, canResume, canSuspend, checkin, checkinEx, checkout, checkoutEx, demote, destroyAllVersions, detachPolicy, disassemble, freeze, getAccessDate, getAccessorApplicationPermit, getAccessorCount, getAccessorName, getAccessorPermit, getAccessorPermitType, getAccessorXPermit, getAccessorXPermitNames, getACL, getACLDomain, getACLName, getAclRefValid, getAcsRequests, getAliasSet, getAliasSetId, getAntecedentId, getApplicationType, getAssembledFromId, getAuthors, getAuthorsCount, getBranchCount, getCabinetId, getChronicleId, getCollectionForContent, getCollectionForContentEx2, getCollectionForContentEx3, getCollectionForContentEx4, getComponentId, getComponentIdCount, getCompoundArchitecture, getContainId, getContainIdCount, getContent, getContentAvailability, getContentEx, getContentEx2, getContentEx3, getContentsId, getContentSize, getContentSize, getContentState, getContentStateCount, getContentType, getCreationDate, getCreatorName, getCurrentState, getCurrentStateName, getDirectDescendant, getDoubleContentAttr, getExceptionStateName, getFile, getFileEx, getFileEx2, getFolderId, getFolderIdCount, getFormat, getFrozenAssemblyCount, getFullText, getGroupName, getGroupPermit, getHasEvents, getHasFolder, getHasFrozenAssembly, getImplicitVersionLabel, getKeywords, getKeywordsCount, getLatestFlag, getLinkCount, getLinkHighCount, getLocations, getLockDate, getLockMachine, getLockOwner, getLogEntry, getMasterDocbase, getModifier, getModifyDate, getNextStateName, getObjectName, getOtherFileSize, getOwnerName, getOwnerPermit, getPageCount, getPath, getPathEx, getPathEx2, getPermissions, getPermit, getPermitEx, getPolicyId, getPolicyName, getPreviousStateName, getReferenceCount, getRemoteId, getRenditions, getResolutionLabel, getResumeState, getResumeStateName, getRetainerCount, getRetainerId, getRetainUntilDate, getRetentionDate, getRouters, getSpecialApp, getStatus, getStorageType, getStringContentAttr, getSubject, getTimeContentAttr, getTitle, getTypeName, getVdmPath, getVdmPathDQL, getVersionLabel, getVersionLabelCount, getVersionLabels, getVersionPolicy, getVersions, getWorkflows, getWorldPermit, getXPermit, getXPermitList, getXPermitNames, grant, grantPermit, hasPermission, insertContent, insertContentEx, insertFile, insertFileEx, insertPart, isArchived, isCheckedOut, isCheckedOutBy, isContentTransferCapabilityEnabled, isFrozen, isHidden, isImmutable, isLinkResolved, isPublic, isReference, isSuspended, isVirtualDocument, link, mark, mount, print, promote, prune, queue, refreshReference, removeContent, removeNote, removePart, removeRendition, removeRenditionEx, removeRenditionEx2, resolveAlias, resume, revertACL, revoke, revokePermit, saveAsNew, saveLock, scheduleDemote, schedulePromote, scheduleResume, scheduleSuspend, setACL, setACLDomain, setACLName, setApplicationType, setArchived, setAuthors, setCompoundArchitecture, setContent, setContentEx, setContentEx2, setContentType, setDoubleContentAttribute, setFile, setFileEx, setFullText, setGroupName, setGroupPermit, setHidden, setIsVirtualDocument, setKeywords, setLinkResolved, setLogEntry, setObjectName, setOwnerName, setOwnerPermit, setPath, setResolutionLabel, setSpecialApp, setStatus, setStorageType, setStringContentAttribute, setSubject, setTimeContentAttribute, setTitle, setWorldPermit, suspend, unfreeze, unlink, unmark, updatePart, updatePartEx, useACL, verifyESignature
Methods inherited from interface com.documentum.fc.client.IDfTypedObject
appendBoolean, appendDouble, appendId, appendInt, appendString, appendTime, appendValue, dump, enumAttrs, findAttrIndex, findBoolean, findDouble, findId, findInt, findString, findTime, findValue, getAllRepeatingStrings, getAttr, getAttrCount, getAttrDataType, getBoolean, getDouble, getId, getInt, getLong, getObjectId, getObjectSession, getOriginalSession, getRepeatingBoolean, getRepeatingDouble, getRepeatingId, getRepeatingInt, getRepeatingLong, getRepeatingString, getRepeatingTime, getRepeatingValue, getSession, getSessionManager, getString, getTime, getValue, getValueAt, getValueCount, hasAttr, insertBoolean, insertDouble, insertId, insertInt, insertString, insertTime, insertValue, isAttrRepeating, isNull, remove, removeAll, setBoolean, setDouble, setId, setInt, setNull, setRepeatingBoolean, setRepeatingDouble, setRepeatingId, setRepeatingInt, setRepeatingString, setRepeatingTime, setRepeatingValue, setSessionManager, setString, setTime, setValue, truncate
-
Field Details
-
TYPE_UNKNOW
Smartlist type : unknow.- See Also:
-
TYPE_PASSTHROUGH_QUERY
Smartlist type : passthrough_query.- See Also:
-
TYPE_QUERY_BUILDER
Smartlist type : query_builder.- See Also:
-
ATTRIBUTE_RESULTSCOUNT
Specific attribute : results_count.- See Also:
-
ATTRIBUTE_HAS_RESULTS
Specific attribute : has_results.- See Also:
-
ATTRIBUTE_SOURCES
Specific attribute : selected_sources.- See Also:
-
ATTRIBUTE_QUERY_TYPE
Specific attribute : query_type.- See Also:
-
DM_INTERNAL
Possible smartlist content : dm_internal.- See Also:
-
-
Method Details
-
getSmartListDefinition
IDfSmartListDefinition getSmartListDefinition(IDfSearchService searchService) throws DfException, IOException Gets the IDfSmartListDefinition associated to this dm_smart_list. Handles automatically the conversion of legacy smart lists.- Parameters:
searchService
- The search service used to handle query definitions.- Returns:
- An IDfSmartListDefinition instance.
- Throws:
DfException
- If the content is not a valid dm_smart_list.IOException
- If an I/O error occurs.
-
setSmartListDefinition
Sets the content of this dm_smart_list.- Parameters:
smartList
- The new smart list definition.- Throws:
DfException
-
isLegacy
Indicates whether this smart list is an old format.- Returns:
true
, if this smart list is a legacy format;false
, otherwise.- Throws:
DfException
- If a server error occurs.
-
save
Stores this search.- Parameters:
location
-withResults
-true
, to save the result set with the search.isPrivate
-true
, to save the search as a private search.- Returns:
- The saved object ID.
- Throws:
DfException
-
getQueryStatus
Gets the IDfQueryStatus.- Returns:
- IDfQueryStatus
- Throws:
DfException
- Since:
- 6.0
-
setQueryStatus
Sets the IDfQueryStatus.- Parameters:
queryStatus
- IDfQueryStatus- Since:
- 6.0
-
getResultsCount
Gets the number of results for the search.- Returns:
- int The number of results.
- Throws:
DfException
- Since:
- 6.0
-
getResultsSet
Gets the IDfResultsSet.- Returns:
- IDfResultsSet
- Throws:
DfException
- Since:
- 6.0
-
areResultsSaved
Checks whether results are saved or not with the search.- Returns:
true
, if results are saved;false
, otherwise.- Throws:
DfException
- Since:
- 6.0
-
setResultsSaved
void setResultsSaved(boolean areResultsSaved) Sets if results are saved or not into the object.- Parameters:
areResultsSaved
-- Since:
- 6.0
-
setResultsSet
Sets the IDfResultsSet.- Parameters:
resultSet
- IDfResultsSet- Throws:
DfException
- Since:
- 6.0
-
getQueryDefinitionType
Gets the Query definition type. Possible values are: IDfSmartList.TYPE_PASS_THROUGH_QUERY or IDfSmartList.TYPE_QUERY_BUILDER- Returns:
- The Query definition type.
- Throws:
DfException
-