|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.svc.repository.service.BaseService
atg.svc.repository.service.KnowledgeBaseService
atg.svc.repository.service.SolutionService
@Service(requiredProperties={"attachmentUtils","eventTools","favoritesService","htmlToTextConverter","qOAAService","recommendedAnswerService","recommendedReadingService","segmentService","siteConfiguration","solutionFieldDataService","solutionMetadataService","solutionRedirectService","solutionScoringService","solutionScoringUtils","solutionValidationUtils","topicService","transactionalFragmentService","optionService","viewedAnswerService"}) public class SolutionService
Business methods for the Solution object. NOTE: The following methods were removed in the 10.0 release. getSolutionBySolutionField(SolutionField pSolutionField) - this method depended on a find by solution field. This functionality is no longer supported now that solutino fields are encoded as a JSON string. getSolutionFieldByValue() - this method depended on a find by solution field value. This functionality is no longer supported now that solutino fields are encoded as a JSON string. NOTE: We did not previously have a base exception class in ATG Service that we threw. To allow for new exceptions to be thrown, we changed the signature of the functions to throw a new SvcException base exception. This will allow us to throw new exceptions in the future without changing the signature of the methods. However, customizations built before 10.0 will need to catch the new SvcException. The PersistenceException, ObjectException and ObjectNotFoundException now sub-class the SvcException. So does the new SolutionFieldStorageException. Methods that previously threw javax.ejb.CreateException, javax.ebj.FinderException or javax.ejb.RemoveException now throw a PersistenceException which is declared as throws SvcException to allow for other SvcExceptions to be thrown in the future.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
EMPTY_STRING
|
static java.lang.String[] |
EMPTY_STRING_ARRAY
|
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
---|
DEFAULT_LOG_TRACE_STATUS |
Fields inherited from interface atg.nucleus.logging.ApplicationLogging |
---|
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS |
Constructor Summary | |
---|---|
SolutionService()
|
Method Summary | |
---|---|
void |
addSolutionField(atg.svc.repository.beans.SolutionClassFieldDefinition pSolutionClassFieldDefinition,
Solution pSolution)
Adds a new SolutionField to a Solution given the field metadata (SolutionClassFieldDefinition). |
void |
addTopic(java.lang.String pTopicId,
Solution pSolution)
Adds a topic to a solution. |
void |
assignSolutionDefaultValues(Solution pSolution)
|
void |
clearSolutionExternalAudience(Solution pSolution)
Clears the all of the segments from the Solution's external audience property. |
java.lang.String |
computeTitle(Solution pSolution)
Computes the title for the given Solution. |
Solution |
copySolution(Solution pSrcSolution)
Copies the data from the given Solution into a brand new Solution. |
Solution |
copySolutionAsNew(java.lang.String pTemplateSolutionId)
Creates a new solution bean based on the template solution provided |
Solution |
createSolution(atg.svc.repository.beans.SolutionClass pSolutionClass)
Creates a new solution repository bean object from the given solution class. |
Solution |
createSolution(atg.svc.repository.beans.SolutionClass pSolutionClass,
SolutionHomes pHomes)
Creates a new Solution object from the given SolutionClass object from the given SolutionHomes. |
Solution |
createSolution(java.lang.String pSolutionClassId)
Creates a new solution repository bean object from the given solution class id. |
Solution |
createSolution(java.lang.String pSolutionClassId,
SolutionHomes pHomes)
Creates a new Solution object from the given SolutionClass object from the given SolutionHomes. |
Solution |
createSolutionBean(atg.svc.repository.beans.SolutionClass pSolutionClass)
Creates a Solution in-memory bean that is not connected to the repository. |
Solution |
createSolutionBean(java.lang.String pSolutionClassId)
Creates a Solution in-memory bean that is not connected to the repository. |
SolutionField |
createSolutionField(atg.svc.repository.beans.SolutionClassFieldDefinition pSolutionClassFieldDefinition,
SolutionHomes pHomes)
Creates a new SolutionField based on the given SolutionClassFieldDefinition. |
SolutionFieldValue |
createSolutionFieldValue(atg.svc.repository.beans.FieldDefinition pFieldDefinition)
Creates a new SolutionFieldValue repository impl. |
SolutionFieldValue |
createSolutionFieldValue(atg.svc.repository.beans.FieldDefinitionType pType)
Creates a new SolutionFieldValue repository impl with the given field type.. |
SolutionFieldValue |
createSolutionFieldValue(atg.svc.repository.beans.FieldDefinitionType pType,
SolutionHomes pHomes)
Creates a new SolutionFieldValue impl from the given SolutionHomes (bean or repository). |
SolutionFieldValue |
createSolutionFieldValue(SolutionField pField)
Creates a SolutionFieldValue for the given SolutionField. |
protected java.util.List<SolutionRelevance> |
createSolutionReferences(Solution pSolution)
Create the initial Solution references. |
SolutionStatus |
createSolutionStatus()
Creates a new solution status bean. |
void |
deleteSolution(java.lang.String pSolutionId)
Deletes a solution and all of its fields given the solution id. |
void |
deleteSolutionStatus(java.lang.String pSolutionStatusId)
Deletes a solution status given it's solution status id. |
Solution |
editSolution(java.lang.String pSolutionId)
Gets an editable Solution bean given its repository id. |
SolutionStatus |
editSolutionStatus(java.lang.String pSolutionStatusId)
Gets an editable version of a solution status given the solution status' id. |
java.util.Collection |
getAllSolutions()
|
atg.svc.repository.service.util.AttachmentUtils |
getAttachmentUtils()
|
atg.svc.agent.events.EventTools |
getEventTools()
|
java.util.List<SolutionField> |
getExternallyVisibleContentFields(Solution pSolution)
Gets the solution content fields that are visible to everyone external. |
java.util.List<SolutionField> |
getExternallyVisiblePropertyFields(Solution pSolution)
Gets the solution property fields that are visible to everyone external. |
java.util.List<SolutionField> |
getExternallyVisibleStatementFields(Solution pSolution)
Gets the solution statement fields that are visible to everyone external. |
FavoritesService |
getFavoritesService()
|
SolutionHomes |
getHomes(java.lang.Object pObject)
Gets the SolutionHomes for the given repository object. |
atg.svc.sgmlparser.parser.HtmlToTextConverter |
getHtmlToTextConverter()
|
java.lang.String |
getInitialSolutionStatus()
|
java.lang.String[] |
getInternalAndExternalSegmentsByValueMatch(java.lang.String pSolutionId,
java.lang.String pFieldName,
java.lang.Object pFieldValue)
Gets the internal and external segments for a given property name and value. |
java.lang.String[] |
getInternalOnlyFields()
Gets the list of field definition types that are internal only - their external audience is set to none. |
java.lang.String |
getLanguage()
The language (locale) code (e.g. |
int |
getMaxComputedTitleLength()
The maximum length allowed when computing the solution title. |
int |
getMaxDisplayedTitleLength()
The maximum length to display the solution title. |
atg.svc.repository.service.OptionService |
getOptionService()
|
Solution |
getPublishedSolutionById(java.lang.String pSolutionId)
Finds the published solution by it's repository id. |
QOAAService |
getQOAAService()
|
RecommendedAnswerService |
getRecommendedAnswerService()
|
RecommendedReadingService |
getRecommendedReadingService()
|
java.lang.String[] |
getSegmentsByValueMatch(java.lang.String pSolutionId,
java.lang.String pFieldName,
java.lang.Object pFieldValue)
Gets the segments for a given property name and value. |
atg.svc.repository.service.SegmentService |
getSegmentService()
|
SiteConfiguration |
getSiteConfiguration()
|
Solution |
getSolutionByDisplayId(java.lang.String pDisplayId)
Finds a solution by it's display id. |
Solution |
getSolutionById(java.lang.String pId)
Finds a solution by it's repository id or legacy id. |
Solution |
getSolutionByPrimaryKey(java.lang.String pId)
Finds a solution by it's repository id only. |
atg.svc.repository.service.SolutionFieldDataServiceImpl |
getSolutionFieldDataService()
|
SolutionFieldValue |
getSolutionFieldValueBean(SolutionField pField,
SolutionFieldValue pSolutionFieldValue)
Gets an editable SolutionFieldValue object given the SolutionField and SolutionFieldValue object. |
SolutionFieldValue |
getSolutionFieldValueById(java.lang.String pId)
Finds a SolutionFieldValue given its repository id. |
SolutionMetadataService |
getSolutionMetadataService()
|
SolutionRedirectService |
getSolutionRedirectService()
|
java.util.List<javax.ejb.EJBLocalObject> |
getSolutionReferences(java.lang.String pSolutionId)
Gets the list of items that refer to a given solution. |
java.util.Collection<Solution> |
getSolutionsByOwningGroupOrgId(java.lang.String organizationId)
Gets Solutions with the given Owning Group. |
SolutionScoringService |
getSolutionScoringService()
|
atg.svc.repository.service.util.SolutionSecurityUtils |
getSolutionSecurityUtils()
|
SolutionStatus |
getSolutionStatusById(java.lang.String pSolutionStatusId)
Finds a solution status by it's repository id. |
java.util.Set<atg.searchadmin.repository.beans.Topic> |
getSolutionTopics(Solution pSolution)
Gets a set of Topic based on the Solution topicIds property. |
atg.svc.repository.service.util.SolutionValidationUtils |
getSolutionValidationUtils()
|
java.lang.Integer |
getSolutionVersion(Solution pSolution)
Gets the version number of the solution. |
atg.searchadmin.repository.service.TopicService |
getTopicService()
|
TransactionalFragmentService |
getTransactionalFragmentService()
|
java.lang.String |
getTruncatedTitleSuffix()
The string that will be appended to any titles that have been truncated. |
java.lang.String |
getVersionedKnowledgeHomesFactoryName()
Gets the versioned KnowledgeHomesFactory . |
ViewedAnswerService |
getViewedAnswerService()
|
boolean |
isCheckoutAttachmentsOnSave()
Returns true if attachments should be checked-out on save. |
boolean |
isFieldEditableForCurrentUser(SolutionField pField)
Returns true if the given property is editable by the current user. |
boolean |
isFieldValueEditableForCurrentUser(SolutionFieldValue pFieldValue)
Returns true if the given property is editable by the current user. |
boolean |
isFieldValueInternallyVisible(SolutionFieldValue pFieldValue,
java.lang.String pSegment)
Returns true if the given segment is found on the internalAudience field of the field value. |
boolean |
isFieldValueVisibleForCurrentUser(SolutionFieldValue pFieldValue)
Returns true if the given property is visible to the current user. |
boolean |
isIgnoreSecurityWhenComputingTitle()
Should we ignore security when computing the solution title NOTE: Migration sets ignoreSecurityWhenComputingTitle to true because statement security isn't migrated yet when the solution title is first computed. |
boolean |
isRemoveSolutionReferencesOnDelete()
Returns true if the QOAA, SolutionRelevance, Favorites and Recommended Readings should be deleted when the assoc. |
boolean |
isSolutionEditableForCurrentUser(Solution pSolution)
Returns true if the given solution is editable for the current user. |
boolean |
isSolutionVisibleForCurrentUser(Solution pSolution)
Returns true if the given solution is visible for the current user. |
boolean |
isValidateOnSaveSolution()
Returns true if validation of the solution should be performed on save. |
void |
mergeTicketHistory(java.lang.String pSourceSolutionId,
java.lang.String pTargetSolutionId)
Merge ticket history for duplicate solutions, removing the history from the "source" solution into the "target" solution. |
java.lang.String |
normalize(java.lang.String pStr)
Removes newline, carriage return, tab characters, repetitive whitespace characters and leading and/or trailing whitespace characters. |
java.lang.String |
normalizeAndTruncate(java.lang.String pStr)
Removes newline, carriage return, tab characters, repetitive whitespace characters and leading and/or trailing whitespace characters then truncates the resulting string if the string exceeds the configured maxComputedTitleLength property. |
java.lang.String |
removeFormatting(java.lang.String pFormattedStr)
Removes HTML formatting, newline, carriage return, tab characters, repetitive whitespace characters and leading and/or trailing whitespace characters. |
java.lang.String |
removeFormattingAndTruncate(java.lang.String pFormattedStr)
Removes HTML formatting, newline, carriage return, tab characters, repetitive whitespace characters and leading and/or trailing whitespace characters then truncates the resulting string if the string exceeds the configured maxComputedTitleLength property. |
void |
removeSolutionField(SolutionField pField)
Removes a SolutionField and any associated SolutionFieldValue objects from the repository. |
void |
saveSolution(Solution pSolution)
Saves the solution. |
void |
saveSolutionStatus(SolutionStatus pSolutionStatus)
Saves a solution status to the repository. |
void |
setAttachmentUtils(atg.svc.repository.service.util.AttachmentUtils pAttachmentUtils)
|
void |
setCheckoutAttachmentsOnSave(boolean pCheckoutAttachmentsOnSave)
|
void |
setEventTools(atg.svc.agent.events.EventTools pEventTools)
|
void |
setFavoritesService(FavoritesService pFavoritesService)
|
void |
setHtmlToTextConverter(atg.svc.sgmlparser.parser.HtmlToTextConverter pHtmlToTextConverter)
|
void |
setIgnoreSecurityWhenComputingTitle(boolean pIgnoreSecurityWhenComputingTitle)
|
void |
setInitialSolutionStatus(java.lang.String pStartingSolutionStatus)
|
void |
setInternalOnlyFields(java.lang.String[] pInternalOnlyFields)
|
void |
setLanguage(java.lang.String pLanguage)
|
void |
setMaxComputedTitleLength(int pMaxComputedTitleLength)
|
void |
setMaxDisplayedTitleLength(int pMaxDisplayedTitleLength)
|
void |
setOptionService(atg.svc.repository.service.OptionService pOptionService)
|
void |
setQOAAService(QOAAService pQOAAService)
|
void |
setRecommendedAnswerService(RecommendedAnswerService pRecommendedAnswerService)
|
void |
setRecommendedReadingService(RecommendedReadingService pRecommendedReadingService)
|
void |
setRemoveSolutionReferencesOnDelete(boolean pRemoveSolutionReferencesOnDelete)
|
void |
setSegmentService(atg.svc.repository.service.SegmentService pSegmentService)
|
void |
setSiteConfiguration(SiteConfiguration pSiteConfiguration)
|
void |
setSolutionFieldDataService(atg.svc.repository.service.SolutionFieldDataServiceImpl pSolutionFieldDataService)
|
void |
setSolutionFieldValue(Solution pSolution,
java.lang.String pFieldName,
java.lang.String[] pSolutionFieldValueIds)
Given a set of SolutionFieldValue ids, copy the values from those SolutionFieldValue objects and set them as the new value on the given field. |
void |
setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
|
void |
setSolutionRedirectService(SolutionRedirectService pSolutionRedirectService)
|
void |
setSolutionScoringService(SolutionScoringService pSolutionScoringService)
|
void |
setSolutionSecurityUtils(atg.svc.repository.service.util.SolutionSecurityUtils pSolutionSecurityUtils)
|
void |
setSolutionValidationUtils(atg.svc.repository.service.util.SolutionValidationUtils pSolutionValidationUtils)
|
void |
setTopicService(atg.searchadmin.repository.service.TopicService pTopicService)
|
void |
setTransactionalFragmentService(TransactionalFragmentService pTransactionalFragmentService)
|
void |
setTruncatedTitleSuffix(java.lang.String pTruncatedTitleSuffix)
|
void |
setValidateOnSaveSolution(boolean pValidateOnSaveSolution)
|
void |
setVersionedKnowledgeHomesFactoryName(java.lang.String pVersionedKnowledgeHomesFactoryName)
|
void |
setViewedAnswerService(ViewedAnswerService pViewedAnswerService)
|
void |
switchSolutionClass(java.lang.String pSolutionClassId,
Solution pSolution)
Changes the solution class on a solution. |
java.lang.String |
truncateTitleForCompute(java.lang.String pTitle)
Truncates the given title string to the configured number of maximum bytes. |
java.lang.String |
truncateTitleForDisplay(java.lang.String pTitle)
Truncates the given title string to the configured number of maximum characters. |
void |
updateCustomFields(Solution pSolution,
java.util.Map<java.lang.String,SolutionField> pFields)
Takes the solution field map and stores it as encoded data on the Solution.encodedFieldData property of the solution. |
void |
updateTopicIds(java.util.Set<java.lang.String> pTopicIds,
Solution pSolution)
Adds/Removes topic(s) to/from a solution. |
Solution |
wrapSolutionRepositoryItem(atg.repository.RepositoryItem pItem)
Wraps a solution repository item in a Solution java bean repository implementation. |
java.util.Collection<Solution> |
wrapSolutionRepositoryItems(java.util.Collection<atg.repository.RepositoryItem> pColl)
Wraps a collection of solution repository item in a collection of Solution java bean repository implementation. |
Methods inherited from class atg.svc.repository.service.KnowledgeBaseService |
---|
getKnowledgeHomesFactory, getServiceSegmentBeanHomes, getServiceSegmentRepositoryHomes, getSolutionBeanHomes, getSolutionRepositoryHomes, setKnowledgeHomesFactory |
Methods inherited from class atg.svc.repository.service.BaseService |
---|
getRepositoryService, getToday, setRepositoryService |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService |
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl |
---|
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
public static final java.lang.String[] EMPTY_STRING_ARRAY
public static final java.lang.String EMPTY_STRING
Constructor Detail |
---|
public SolutionService()
Method Detail |
---|
public atg.svc.repository.service.util.AttachmentUtils getAttachmentUtils()
public void setAttachmentUtils(atg.svc.repository.service.util.AttachmentUtils pAttachmentUtils)
public atg.svc.agent.events.EventTools getEventTools()
public void setEventTools(atg.svc.agent.events.EventTools pEventTools)
public FavoritesService getFavoritesService()
public void setFavoritesService(FavoritesService pFavoritesService)
public atg.svc.sgmlparser.parser.HtmlToTextConverter getHtmlToTextConverter()
public void setHtmlToTextConverter(atg.svc.sgmlparser.parser.HtmlToTextConverter pHtmlToTextConverter)
public QOAAService getQOAAService()
public void setQOAAService(QOAAService pQOAAService)
public RecommendedAnswerService getRecommendedAnswerService()
public void setRecommendedAnswerService(RecommendedAnswerService pRecommendedAnswerService)
public RecommendedReadingService getRecommendedReadingService()
public void setRecommendedReadingService(RecommendedReadingService pRecommendedReadingService)
public atg.svc.repository.service.SegmentService getSegmentService()
public void setSegmentService(atg.svc.repository.service.SegmentService pSegmentService)
public SiteConfiguration getSiteConfiguration()
public void setSiteConfiguration(SiteConfiguration pSiteConfiguration)
public void setSolutionFieldDataService(atg.svc.repository.service.SolutionFieldDataServiceImpl pSolutionFieldDataService)
public atg.svc.repository.service.SolutionFieldDataServiceImpl getSolutionFieldDataService()
public SolutionMetadataService getSolutionMetadataService()
public void setSolutionMetadataService(SolutionMetadataService pSolutionMetadataService)
public SolutionRedirectService getSolutionRedirectService()
public void setSolutionRedirectService(SolutionRedirectService pSolutionRedirectService)
public SolutionScoringService getSolutionScoringService()
public void setSolutionScoringService(SolutionScoringService pSolutionScoringService)
public atg.svc.repository.service.util.SolutionSecurityUtils getSolutionSecurityUtils()
public void setSolutionSecurityUtils(atg.svc.repository.service.util.SolutionSecurityUtils pSolutionSecurityUtils)
public atg.svc.repository.service.util.SolutionValidationUtils getSolutionValidationUtils()
public void setSolutionValidationUtils(atg.svc.repository.service.util.SolutionValidationUtils pSolutionValidationUtils)
public atg.searchadmin.repository.service.TopicService getTopicService()
public void setTopicService(atg.searchadmin.repository.service.TopicService pTopicService)
public TransactionalFragmentService getTransactionalFragmentService()
public void setTransactionalFragmentService(TransactionalFragmentService pTransactionalFragmentService)
public atg.svc.repository.service.OptionService getOptionService()
public void setOptionService(atg.svc.repository.service.OptionService pOptionService)
public java.lang.String getVersionedKnowledgeHomesFactoryName()
KnowledgeHomesFactory
.
Need to retrieve the solution version number in getSolutionVersion(Solution)
public void setVersionedKnowledgeHomesFactoryName(java.lang.String pVersionedKnowledgeHomesFactoryName)
public ViewedAnswerService getViewedAnswerService()
public void setViewedAnswerService(ViewedAnswerService pViewedAnswerService)
public java.lang.String getInitialSolutionStatus()
public void setInitialSolutionStatus(java.lang.String pStartingSolutionStatus)
public boolean isCheckoutAttachmentsOnSave()
public void setCheckoutAttachmentsOnSave(boolean pCheckoutAttachmentsOnSave)
public java.lang.String[] getInternalOnlyFields()
public void setInternalOnlyFields(java.lang.String[] pInternalOnlyFields)
public java.lang.String getLanguage()
public void setLanguage(java.lang.String pLanguage)
public boolean isValidateOnSaveSolution()
public void setValidateOnSaveSolution(boolean pValidateOnSaveSolution)
public boolean isRemoveSolutionReferencesOnDelete()
public void setRemoveSolutionReferencesOnDelete(boolean pRemoveSolutionReferencesOnDelete)
public boolean isIgnoreSecurityWhenComputingTitle()
public void setIgnoreSecurityWhenComputingTitle(boolean pIgnoreSecurityWhenComputingTitle)
public int getMaxDisplayedTitleLength()
public void setMaxDisplayedTitleLength(int pMaxDisplayedTitleLength)
public int getMaxComputedTitleLength()
public void setMaxComputedTitleLength(int pMaxComputedTitleLength)
public java.lang.String getTruncatedTitleSuffix()
public void setTruncatedTitleSuffix(java.lang.String pTruncatedTitleSuffix)
public Solution getSolutionById(java.lang.String pId) throws SvcException, ObjectNotFoundException
pId
- The repository or legacy id of a Solution.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution getSolutionByPrimaryKey(java.lang.String pId) throws SvcException, ObjectNotFoundException
pId
- The repository id of a Solution.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution getSolutionByDisplayId(java.lang.String pDisplayId) throws SvcException, ObjectNotFoundException
pDisplayId
- The legacy id or repository id.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution getPublishedSolutionById(java.lang.String pSolutionId) throws SvcException, ObjectNotFoundException
pSolutionId
- The repository id.
ObjectNotFoundException
- If the id is not found or the solution is not externally visible.
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public java.lang.Integer getSolutionVersion(Solution pSolution)
pSolution
-
public Solution createSolution(java.lang.String pSolutionClassId) throws SvcException, ObjectNotFoundException
pSolutionClassId
- The id of the solution class.
ObjectNotFoundException
- if solution class is not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution createSolution(atg.svc.repository.beans.SolutionClass pSolutionClass) throws SvcException
pSolutionClass
- The solution class object.
SvcException
- If the create of the Solution or any SolutionField objects derived from the SolutionClass fails.public Solution createSolutionBean(java.lang.String pSolutionClassId) throws SvcException, ObjectNotFoundException
pSolutionClassId
- The id of the SolutionClass to create the Solution from.
ObjectNotFoundException
- if solution class is not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution createSolutionBean(atg.svc.repository.beans.SolutionClass pSolutionClass) throws SvcException
pSolutionClass
- The SolutionClass object to create the Solution from.
SvcException
- If an exception is thrown when the in-memory bean is created.public Solution createSolution(java.lang.String pSolutionClassId, SolutionHomes pHomes) throws SvcException, ObjectNotFoundException
pSolutionClassId
- The id of the SolutionClass to create the Solution from.
ObjectNotFoundException
- if solution class is not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public Solution createSolution(atg.svc.repository.beans.SolutionClass pSolutionClass, SolutionHomes pHomes) throws SvcException
pSolutionClass
- The SolutionClass to create the Solution from.
SvcException
- If the homes are repository and the repository create operation failspublic Solution editSolution(java.lang.String pSolutionId) throws SvcException, ObjectNotFoundException
pSolutionId
- The id of the Solution to edit.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public void deleteSolution(java.lang.String pSolutionId) throws SvcException, ObjectNotFoundException
pSolutionId
- The id of the solution to delete.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public void removeSolutionField(SolutionField pField) throws SvcException
pField
- The SolutionField to remove.
SvcException
- If the remove operation fails.public Solution copySolution(Solution pSrcSolution) throws SvcException
pSrcSolution
- The Solution to copy into a new Solution.
SvcException
- If the create operation fails.public Solution copySolutionAsNew(java.lang.String pTemplateSolutionId) throws SvcException, ObjectNotFoundException, javax.ejb.CreateException, atg.beans.PropertyNotFoundException
pTemplateSolutionId
- The Solution ID to use as a template.
SvcException
ObjectNotFoundException
javax.ejb.CreateException
atg.beans.PropertyNotFoundException
protected java.util.List<SolutionRelevance> createSolutionReferences(Solution pSolution) throws SvcException
pSolution
- The solution to whose references these are for.
SvcException
public java.util.List<javax.ejb.EJBLocalObject> getSolutionReferences(java.lang.String pSolutionId) throws SvcException
pSolutionId
- The id of the solution to get the references for.
SvcException
QOAA
,
RecommendedReading
,
Favorites
public void saveSolution(Solution pSolution) throws SvcException
pSolution
- The Solution to save.
SvcException
public void switchSolutionClass(java.lang.String pSolutionClassId, Solution pSolution) throws SvcException
pSolution
- The editable solution bean.pSolutionClassId
- The id of the new solution class to set.
ObjectNotFoundException
- if solution class is not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public java.lang.String computeTitle(Solution pSolution)
pSolution
- The non-null solution to get the title for.
java.lang.IllegalArgumentException
- If the pSolution parameter is null.public java.lang.String truncateTitleForDisplay(java.lang.String pTitle)
pTitle
- The string to truncate.
public java.lang.String truncateTitleForCompute(java.lang.String pTitle)
pTitle
- The string to truncate.
public void clearSolutionExternalAudience(Solution pSolution)
pSolution
- The Solution to clear the segments from.public void addTopic(java.lang.String pTopicId, Solution pSolution)
pTopicId
- The topic to add.pSolution
- The Solution to add the topic to.public void updateTopicIds(java.util.Set<java.lang.String> pTopicIds, Solution pSolution)
pTopicIds
- The new set of topic ids (string)pSolution
- The Solution to add the topic to.public void setSolutionFieldValue(Solution pSolution, java.lang.String pFieldName, java.lang.String[] pSolutionFieldValueIds) throws SvcException, atg.beans.PropertyNotFoundException
pSolution
- The solution that contains the field to set the values onpFieldName
- The name of the field in the solution's field map to set the values onpSolutionFieldValueIds
- The array of solution field values (by id) to set as the new value on the given
SolutionField.pSolution
-
SvcException
- If the create of a new SolutionFieldValue fails.
atg.beans.PropertyNotFoundException
- If the SolutionField with the given name does not exist on the Solution.public boolean isSolutionVisibleForCurrentUser(Solution pSolution)
pSolution
- The Solution to check access on.
public boolean isSolutionEditableForCurrentUser(Solution pSolution)
pSolution
- The Solution to check access on.
public SolutionFieldValue createSolutionFieldValue(atg.svc.repository.beans.FieldDefinition pFieldDefinition) throws SvcException
pFieldDefinition
- The field definition to create the solution field value from.
SvcException
- If the SolutionFieldValue is a repository object and the create operation fails.public SolutionFieldValue createSolutionFieldValue(atg.svc.repository.beans.FieldDefinitionType pType) throws SvcException
pType
- The field definition type to create the solution field value from.
SvcException
- If the SolutionFieldValue is a repository object and the create operation fails.public SolutionFieldValue createSolutionFieldValue(SolutionField pField) throws SvcException
pField
- The field to create the SolutionFieldValue for.
SvcException
- If the SolutionFieldValue is a repository object and the create operation fails.public SolutionFieldValue createSolutionFieldValue(atg.svc.repository.beans.FieldDefinitionType pType, SolutionHomes pHomes) throws SvcException
pType
- The field definition type to create the solution field value from.pHomes
- The SolutionHomes to create the solution field value from.
SvcException
- If the create is in the repository and the create operation fails.public SolutionFieldValue getSolutionFieldValueBean(SolutionField pField, SolutionFieldValue pSolutionFieldValue)
pField
- The field parent of the field value.pSolutionFieldValue
- The field value to edit.
public SolutionFieldValue getSolutionFieldValueById(java.lang.String pId) throws ObjectNotFoundException
pId
- The repository id of the SolutionFieldValue to find.
ObjectNotFoundException
- if solution field value is not foundpublic boolean isFieldEditableForCurrentUser(SolutionField pField)
public boolean isFieldValueVisibleForCurrentUser(SolutionFieldValue pFieldValue)
pFieldValue
- The solution property.
public boolean isFieldValueEditableForCurrentUser(SolutionFieldValue pFieldValue)
pFieldValue
- The solution property.
public boolean isFieldValueInternallyVisible(SolutionFieldValue pFieldValue, java.lang.String pSegment)
pFieldValue
- The field value to examine.pSegment
- The segment to search for on the field value.
public java.lang.String[] getInternalAndExternalSegmentsByValueMatch(java.lang.String pSolutionId, java.lang.String pFieldName, java.lang.Object pFieldValue) throws SvcException, ObjectNotFoundException
pSolutionId
- The id of the Solution.pFieldName
- The name of the property.pFieldValue
- The value to match.
ObjectNotFoundException
- if solution not found
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public java.lang.String[] getSegmentsByValueMatch(java.lang.String pSolutionId, java.lang.String pFieldName, java.lang.Object pFieldValue) throws SvcException, ObjectNotFoundException
pSolutionId
- The id of the Solution.pFieldName
- The name of the property.pFieldValue
- The value to match.
ObjectNotFoundException
- If the FieldDefinition cannot be found by name OR the Solution cannot by found by id.
atg.svc.repository.service.exception.SvcException
- for all other errors
SvcException
public java.util.List<SolutionField> getExternallyVisiblePropertyFields(Solution pSolution)
pSolution
- The SolutionClass to get the statement fields from.
public java.util.List<SolutionField> getExternallyVisibleContentFields(Solution pSolution)
pSolution
- The SolutionClass to get the statement fields from.
public java.util.List<SolutionField> getExternallyVisibleStatementFields(Solution pSolution)
pSolution
- The SolutionClass to get the statement fields from.
public java.util.Collection getAllSolutions() throws javax.ejb.EJBException, javax.ejb.FinderException
javax.ejb.EJBException
javax.ejb.FinderException
public SolutionStatus getSolutionStatusById(java.lang.String pSolutionStatusId) throws ObjectNotFoundException
pSolutionStatusId
- The repository id.
ObjectNotFoundException
- If the SolutionStatus is not found
SvcException
- If the id is not found.public SolutionStatus createSolutionStatus() throws SvcException
atg.svc.repository.service.exception.SvcException
- If the create fails.
SvcException
public SolutionStatus editSolutionStatus(java.lang.String pSolutionStatusId) throws ObjectNotFoundException
pSolutionStatusId
- A Solution Status
ObjectNotFoundException
- if the soltuion status is not foundpublic void saveSolutionStatus(SolutionStatus pSolutionStatus) throws PersistenceException
pSolutionStatus
- The solution status to save.
PersistenceException
public void deleteSolutionStatus(java.lang.String pSolutionStatusId) throws SvcException, ObjectNotFoundException
pSolutionStatusId
- The id of the solution status to delete.
ObjectNotFoundException
- If the solution status repository item is not found.
atg.svc.repository.service.exception.SvcException
- If the delete fails.
SvcException
public java.util.Set<atg.searchadmin.repository.beans.Topic> getSolutionTopics(Solution pSolution)
Topic
based on the Solution topicIds property.
If a topic lookup fails, the topic is omitted from the returned topics.
pSolution
- The Solution to get the topics for.
public java.lang.String removeFormattingAndTruncate(java.lang.String pFormattedStr)
pFormattedStr
- The non-null string to remove formatting and possibly truncate.
java.lang.IllegalArgumentException
- If the pFormattedStr param is nullpublic java.lang.String removeFormatting(java.lang.String pFormattedStr)
pFormattedStr
- The non-null string to remove formatting and possibly truncate.
java.lang.IllegalArgumentException
- If the pFormattedStr param is nullpublic java.lang.String normalize(java.lang.String pStr)
pStr
- The string to remove characters and possibly truncate.
public java.lang.String normalizeAndTruncate(java.lang.String pStr)
pStr
- The string to remove characters and possibly truncate.
public SolutionHomes getHomes(java.lang.Object pObject)
pObject
- The object to get the homes for.
public void mergeTicketHistory(java.lang.String pSourceSolutionId, java.lang.String pTargetSolutionId) throws SvcException, ObjectNotFoundException
pSourceSolutionId
- repository id of the solution the history is moving frompTargetSolutionId
- repository id of the solution the history is moving to.
ObjectNotFoundException
- if source or target solution is not found
SvcException
- for all other errorspublic void updateCustomFields(Solution pSolution, java.util.Map<java.lang.String,SolutionField> pFields) throws SvcException, ObjectNotFoundException
pSolution
- The solution to updatepFields
- The field values to store
SolutionFieldStorageException
PersistenceException
SvcException
ObjectNotFoundException
public void addSolutionField(atg.svc.repository.beans.SolutionClassFieldDefinition pSolutionClassFieldDefinition, Solution pSolution) throws SvcException
pSolutionClassFieldDefinition
- The solution field metadata.pSolution
- The solution to add the field.
SvcException
- If the create fails.public SolutionField createSolutionField(atg.svc.repository.beans.SolutionClassFieldDefinition pSolutionClassFieldDefinition, SolutionHomes pHomes) throws SvcException
pSolutionClassFieldDefinition
- The solution field metadatapHomes
- The homes to use for the create
SvcException
- If the create fails
atg.service.idgen.IdGeneratorException
public java.util.Collection<Solution> getSolutionsByOwningGroupOrgId(java.lang.String organizationId)
organizationId
- The organization id of the Owning Group
public Solution wrapSolutionRepositoryItem(atg.repository.RepositoryItem pItem)
pItem
- The item to wrap.
public java.util.Collection<Solution> wrapSolutionRepositoryItems(java.util.Collection<atg.repository.RepositoryItem> pColl)
pColl
- The collection of repository items to wrap.
public void assignSolutionDefaultValues(Solution pSolution)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |