public interface IDfSmartList extends IDfSysObject
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.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTRIBUTE_HAS_RESULTS
Specific attribute : has_results.
|
static java.lang.String |
ATTRIBUTE_QUERY_TYPE
Specific attribute : query_type.
|
static java.lang.String |
ATTRIBUTE_RESULTSCOUNT
Specific attribute : results_count.
|
static java.lang.String |
ATTRIBUTE_SOURCES
Specific attribute : selected_sources.
|
static java.lang.String |
DM_INTERNAL
Possible smartlist content : dm_internal.
|
static java.lang.String |
TYPE_PASSTHROUGH_QUERY
Smartlist type : passthrough_query.
|
static java.lang.String |
TYPE_QUERY_BUILDER
Smartlist type : query_builder.
|
static java.lang.String |
TYPE_UNKNOW
Smartlist type : unknow.
|
CURRENCY_CHECK_ALWAYS, CURRENCY_CHECK_FIRST_ACCESS, CURRENCY_CHECK_NEVER, CURRENCY_CHECK_ONCE_PER_SCOPE
Modifier and Type | Method and Description |
---|---|
boolean |
areResultsSaved()
Checks whether results are saved or not with the search.
|
java.lang.String |
getQueryDefinitionType()
Gets the Query definition type.
|
IDfQueryStatus |
getQueryStatus()
Gets the IDfQueryStatus.
|
int |
getResultsCount()
Gets the number of results for the search.
|
IDfResultsSet |
getResultsSet()
Gets the IDfResultsSet.
|
IDfSmartListDefinition |
getSmartListDefinition(IDfSearchService searchService)
Gets the IDfSmartListDefinition associated to this dm_smart_list.
|
boolean |
isLegacy()
Indicates whether this smart list is an old format.
|
java.lang.String |
save(java.lang.String location,
boolean withResults,
boolean isPrivate)
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.
|
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
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
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
static final java.lang.String TYPE_UNKNOW
static final java.lang.String TYPE_PASSTHROUGH_QUERY
static final java.lang.String TYPE_QUERY_BUILDER
static final java.lang.String ATTRIBUTE_RESULTSCOUNT
static final java.lang.String ATTRIBUTE_HAS_RESULTS
static final java.lang.String ATTRIBUTE_SOURCES
static final java.lang.String ATTRIBUTE_QUERY_TYPE
static final java.lang.String DM_INTERNAL
IDfSmartListDefinition getSmartListDefinition(IDfSearchService searchService) throws DfException, java.io.IOException
searchService
- The search service used to handle query definitions.DfException
- If the content is not a valid dm_smart_list.java.io.IOException
- If an I/O error occurs.void setSmartListDefinition(IDfSmartListDefinition smartList) throws DfException
smartList
- The new smart list definition.DfException
boolean isLegacy() throws DfException
true
, if this smart list is a legacy format; false
, otherwise.DfException
- If a server error occurs.java.lang.String save(java.lang.String location, boolean withResults, boolean isPrivate) throws DfException
location
- withResults
- true
, to save the result set with the search.isPrivate
- true
, to save the search as a private search.DfException
IDfQueryStatus getQueryStatus() throws DfException
DfException
void setQueryStatus(IDfQueryStatus queryStatus)
queryStatus
- IDfQueryStatusint getResultsCount() throws DfException
DfException
IDfResultsSet getResultsSet() throws DfException
DfException
boolean areResultsSaved() throws DfException
true
, if results are saved; false
, otherwise.DfException
void setResultsSaved(boolean areResultsSaved)
areResultsSaved
- void setResultsSet(IDfResultsSet resultSet) throws DfException
resultSet
- IDfResultsSetDfException
java.lang.String getQueryDefinitionType() throws DfException
DfException
Copyright 1994-2023 OpenText Corporation. All rights reserved.