|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.GenericService
atg.svc.repository.service.BaseService
atg.svc.repository.service.KnowledgeBaseService
atg.svc.repository.service.SolutionMetadataService
public class SolutionMetadataService
Business methods for the FieldDefinition, SolutionClass and associated objects. These objects form the metadata for a solution.
Nested Class Summary | |
---|---|
protected class |
SolutionMetadataService.BooleanFieldDefinitionFactory
|
protected class |
SolutionMetadataService.DateFieldDefinitionFactory
|
protected class |
SolutionMetadataService.DecimalFieldDefinitionFactory
|
protected static interface |
SolutionMetadataService.FieldDefinitionFactory
Interface for factory to create field definitions |
protected class |
SolutionMetadataService.ListFieldDefinitionFactory
|
protected class |
SolutionMetadataService.NumberFieldDefinitionFactory
|
protected class |
SolutionMetadataService.OrganizationFieldDefinitionFactory
|
protected class |
SolutionMetadataService.StatementFieldDefinitionFactory
|
protected class |
SolutionMetadataService.TextFieldDefinitionFactory
|
protected class |
SolutionMetadataService.TransactionalFragmentFieldDefinitionFactory
|
protected class |
SolutionMetadataService.UserFieldDefinitionFactory
|
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
EMPTY_STRING
|
static java.lang.String[] |
EMPTY_STRING_ARRAY
|
static java.lang.String |
LIST_FIELD_VALUE_SORT_ORDER_ALPHABETICAL
|
static java.lang.String |
LIST_FIELD_VALUE_SORT_ORDER_MANUAL
|
Fields inherited from class atg.svc.repository.service.BaseService |
---|
mBeanHomes, mBeanHomesName, mRepositoryHomes, mRepositoryHomesName |
Fields inherited from class atg.nucleus.GenericService |
---|
SERVICE_INFO_KEY |
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 | |
---|---|
SolutionMetadataService()
|
Method Summary | |
---|---|
FieldDefinition |
createCustomFieldDefinition(FieldDefinitionType pType)
Creates a custom field definition and sets the type, purpose, usage and editor accordingly. |
void |
createDefaultFieldValue(FieldDefinition pFieldDefinition,
int pDisplayOrder,
java.lang.Object pValue)
Creates a single default value on a FieldDefinition and commits it to the repository. |
EnumeratedListValue |
createEnumeratedListValue()
Creates an enumerated list value object in the repository. |
FieldDefinition |
createFieldDefinition(FieldDefinitionType pType)
Creates a new FieldDefinition repository object. |
SolutionClass |
createSolutionClass()
Creates a new SolutionClass. |
SolutionClassFieldDefinition |
createSolutionClassFieldDefinition()
Creates a new SolutionClassFieldDefinition repository bean. |
void |
deleteFieldDefinition(java.lang.String pFieldDefinitionId)
Deletes the given FieldDefinition from the repository. |
void |
deleteSolutionClass(java.lang.String pSolutionClassId)
Deletes a SolutionClass and its associated SolutionClassFieldDefinition items. |
void |
deleteSolutionClassFieldDefinition(java.lang.String pSolutionClassFieldDefinitionId)
Deletes a SolutionClassFieldDefinition given the id of the SolutionClassFieldDefinition. |
java.util.Collection |
getAllSolutionClasses()
Retrieves all solution classes |
FieldDefinitionTypeMetadata |
getBooleanFieldMetadata()
Gets metadata about the Boolean field type. |
FieldDefinitionTypeMetadata |
getDateFieldMetadata()
Gets metadata about the Date field type. |
FieldDefinitionTypeMetadata |
getDecimalFieldMetadata()
Gets metadata about the Decimal field type. |
java.lang.String |
getDefaultFalseLabel()
Gets the default value to set on a BooleanFieldDefinition.falseLabel property when it's created. |
java.lang.String |
getDefaultListFieldValueSortOrder()
Gets the default display sort order for list field value of the solution class. |
java.lang.String |
getDefaultTrueLabel()
Gets the default value to set on a BooleanFieldDefinition.trueLabel property when it's created. |
java.util.List |
getDefaultValues(FieldDefinition pFieldDefinition)
Gets all default values for the given field definition sorted by display order. |
java.util.List |
getDefaultValues(java.lang.String pFieldName)
Gets all default values for the given field definition sorted by display order. |
EnumeratedListValue |
getEnumeratedListValueById(java.lang.String pId)
Gets an EnumeratedListValue by repository id. |
java.util.List |
getExternallyVisiblePropertyFields(SolutionClass pSolutionClass)
Gets the solution class property fields that are visible to everyone external. |
java.util.List |
getExternallyVisibleStatementFields(SolutionClass pSolutionClass)
Gets the solution class statement fields that are visible to everyone external. |
FieldDefinition |
getFieldDefinitionById(java.lang.String pFieldDefinitionId)
Gets a FieldDefinition by its repository id. |
FieldDefinition |
getFieldDefinitionByName(java.lang.String pName)
Gets a FieldDefinition by its logical name. |
FieldDefinitionIndexing |
getFieldDefinitionIndexing(java.lang.String pName)
Gets a FieldDefinitionIndexing by name. |
java.lang.String[] |
getFieldDefinitionIndexingTags()
Gets the FieldDefinitionIndexing tags - the list of possible string values. |
FieldDefinitionTypeMetadata |
getFieldDefinitionMetadataByType(FieldDefinitionType pType)
Finds a FieldDefinitionTypeMetadata object given the FieldDefinition type. |
FieldDefinitionTypeMetadata |
getFieldDefinitionMetadataByType(java.lang.String pName)
Finds a FieldDefinitionTypeMetadata object given the FieldDefinition type name. |
FieldDefinitionPurpose |
getFieldDefinitionPurpose(java.lang.String pName)
Gets a FieldDefinitionPurpose by name. |
java.lang.String[] |
getFieldDefinitionPurposeTags()
Gets the FieldDefinitionPurpose tags - the list of possible string values. |
FieldDefinitionType |
getFieldDefinitionType(java.lang.String pName)
Gets a FieldDefinitionType by name. |
java.lang.String[] |
getFieldDefinitionTypeTags()
Gets the FieldDefinitionType tags - the list of possible string values. |
java.lang.String[] |
getInternalOnlyFields()
Gets the list of field definition types that are internal only. |
FieldDefinitionTypeMetadata |
getListFieldMetadata()
Gets metadata about the List field type. |
FieldDefinitionTypeMetadata |
getNumberFieldMetadata()
Gets metadata about the Number field type. |
FieldDefinitionTypeMetadata |
getOrganizationFieldMetadata()
Gets metadata about the Organization field type. |
SegmentService |
getSegmentService()
Gets the SegmentService business component. |
SolutionClass |
getSolutionClassById(java.lang.String pSolutionClassId)
Finds a solution class by it's repository id. |
SolutionClassFieldDefinition |
getSolutionClassFieldDefinitionById(java.lang.String pId)
Finds a solution class property definition by it's repository id. |
SolutionClassFieldDefinition |
getSolutionClassFieldDefinitionByName(SolutionClass pSolutionClass,
java.lang.String pName)
Gets a SolutionClassFieldDefinition from a SolutionClass given the name of the FieldDefinition. |
atg.svc.repository.service.util.SolutionSecurityUtils |
getSolutionSecurityUtils()
Gets the SolutionSecurityUtils business component. |
FieldDefinitionTypeMetadata |
getStatementFieldMetadata()
Gets metadata about the Statement field type. |
FieldDefinitionTypeMetadata |
getTextFieldMetadata()
Gets metadata about the Text field type. |
FieldDefinitionTypeMetadata |
getTransactionalFragmentFieldMetadata()
Gets metadata about the Transactional Fragment field type. |
FieldDefinitionTypeMetadata |
getUserFieldMetadata()
Gets metadata about the User field type. |
java.util.List |
getVisibleFields(SolutionClass pSolutionClass)
Gets the ordered list of SolutionClassFieldDefinitions that are visible to the current user. |
java.util.List |
getVisibleListValues(ListFieldDefinition pFieldDefinition)
Gets the list values that are visible for the current user. |
java.util.List |
getVisiblePropertyFields(SolutionClass pSolutionClass)
Gets the ordered list of property SolutionClassFieldDefinitions that are visible to the current user. |
java.util.List |
getVisibleStatementFields(SolutionClass pSolutionClass)
Gets the ordered list of solution SolutionClassFieldDefinitions that are visible to the current user. |
boolean |
isFieldDefinitionByName(java.lang.String pName)
|
boolean |
isFieldEditableForCurrentUser(FieldDefinition pField)
Returns true if the given property is visible to the current user. |
boolean |
isFieldExternallyVisible(FieldDefinition pField,
java.lang.String pSegment)
Returns true if the given segment is found on the internalAudience field of the field definition. |
boolean |
isFieldVisibleForCurrentUser(FieldDefinition pField)
Returns true if the given property is visible to the current user. |
boolean |
isInternalOnlyFieldDefinition(FieldDefinition pFieldDefinition)
Returns true if the given field definition's type is one of the configured internal-only fields. |
boolean |
isStatementField(FieldDefinition pFieldDefinition)
Returns true if the given FieldDefinition is a statement or text field. |
void |
saveFieldDefinition(FieldDefinition pFieldDefinition)
Writes the given FieldDefinition object to the repository and any list values that have changed underneath the FieldDefinition object. |
void |
saveSolutionClass(SolutionClass pSolutionClass)
Writes a SolutionClass object to the repository. |
void |
saveSolutionClassFieldDefinition(SolutionClassFieldDefinition pSolutionClassFieldDefinition)
Writes the given SolutionClassFieldDefinition object to the repository if it has been modified. |
void |
setDefaultFalseLabel(java.lang.String pDefaultFalseLabel)
Sets the default value to set on a BooleanFieldDefinition.falseLabel property when it's created. |
void |
setDefaultFieldDefinitionExternalAudience(FieldDefinition pFieldDefinition)
Adds the default segment to a field definition external audience if the field definition is not an internal-only field. |
void |
setDefaultListFieldValueSortOrder(java.lang.String pDefaultListFieldValueSortOrder)
Sets the default display sort order for list field value of the solution class |
void |
setDefaultTrueLabel(java.lang.String pDefaultTrueLabel)
Sets the default value to set on a BooleanFieldDefinition.trueLabel property when it's created. |
void |
setDefaultValues(java.util.List pValues,
FieldDefinition pFieldDefinition)
Sets 1..n default values on a FieldDefinition. |
void |
setInternalOnlyFields(java.lang.String[] pInternalOnlyFields)
Sets the list of field definition types that are internal only. |
void |
setSegmentService(SegmentService pSegmentService)
Sets the SegmentService business component. |
void |
setSolutionSecurityUtils(atg.svc.repository.service.util.SolutionSecurityUtils pSolutionSecurityUtils)
Sets the SolutionSecurityUtils business component. |
Methods inherited from class atg.svc.repository.service.KnowledgeBaseService |
---|
getBeanHomes, getRepositoryHomes |
Methods inherited from class atg.svc.repository.service.BaseService |
---|
getBaseBeanHomes, getBaseRepositoryHomes, getBeanHomesName, getRepositoryHomesName, getRepositoryService, getToday, setBeanHomesName, setRepositoryHomesName, setRepositoryService |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingWarning, setServiceInfo, startService, stopService |
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
public static final java.lang.String LIST_FIELD_VALUE_SORT_ORDER_MANUAL
public static final java.lang.String LIST_FIELD_VALUE_SORT_ORDER_ALPHABETICAL
Constructor Detail |
---|
public SolutionMetadataService()
Method Detail |
---|
public void setDefaultListFieldValueSortOrder(java.lang.String pDefaultListFieldValueSortOrder)
pDefaultListFieldValueSortOrder
- The default display sort order for list field value
of the solution class
Can be one of the folowing: "manual", "alphabetical"
Default is "manual"public java.lang.String getDefaultListFieldValueSortOrder()
public SegmentService getSegmentService()
public void setSegmentService(SegmentService pSegmentService)
pSegmentService
- The SegmentService business component.public atg.svc.repository.service.util.SolutionSecurityUtils getSolutionSecurityUtils()
public void setSolutionSecurityUtils(atg.svc.repository.service.util.SolutionSecurityUtils pSolutionSecurityUtils)
pSolutionSecurityUtils
- The SolutionSecurityUtils business component.public java.lang.String[] getInternalOnlyFields()
public void setInternalOnlyFields(java.lang.String[] pInternalOnlyFields)
pInternalOnlyFields
- The String array of field definition types by name.public java.lang.String getDefaultFalseLabel()
public void setDefaultFalseLabel(java.lang.String pDefaultFalseLabel)
pDefaultFalseLabel
- The default value to set on a BooleanFieldDefinition.falseLabel when it's created.public java.lang.String getDefaultTrueLabel()
public void setDefaultTrueLabel(java.lang.String pDefaultTrueLabel)
pDefaultTrueLabel
- The default value to set on a BooleanFieldDefinition.trueLabel when it's created.public boolean isFieldVisibleForCurrentUser(FieldDefinition pField)
public boolean isFieldEditableForCurrentUser(FieldDefinition pField)
public boolean isFieldExternallyVisible(FieldDefinition pField, java.lang.String pSegment)
pField
- The field definition to examine.pSegment
- The segment to search for on the field definition.
public java.util.List getVisibleFields(SolutionClass pSolutionClass)
pSolutionClass
- The SolutionClass to get the list from.
public java.util.List getVisibleStatementFields(SolutionClass pSolutionClass)
pSolutionClass
- The SolutionClass to get the list from.
public java.util.List getVisiblePropertyFields(SolutionClass pSolutionClass)
pSolutionClass
- The SolutionClass to get the list from.
public java.util.List getExternallyVisiblePropertyFields(SolutionClass pSolutionClass)
pSolutionClass
- The SolutionClass to get the statement fields from.
public java.util.List getExternallyVisibleStatementFields(SolutionClass pSolutionClass)
pSolutionClass
- The SolutionClass to get the statement fields from.
public SolutionClassFieldDefinition getSolutionClassFieldDefinitionByName(SolutionClass pSolutionClass, java.lang.String pName)
pSolutionClass
- The SolutionClass to search.pName
- The name of the field to find.
public SolutionClass getSolutionClassById(java.lang.String pSolutionClassId) throws ObjectNotFoundException
pSolutionClassId
- The repository id.
ObjectNotFoundException
- If the id is not found.public SolutionClass createSolutionClass() throws javax.ejb.CreateException
javax.ejb.CreateException
- If the create operation fails.public void saveSolutionClass(SolutionClass pSolutionClass) throws PersistenceException
pSolutionClass
- The SolutionClass to write.
PersistenceException
- If the write fails.public void deleteSolutionClass(java.lang.String pSolutionClassId) throws javax.ejb.FinderException, ObjectNotFoundException, PersistenceException, ReferentialIntegrityException
pSolutionClassId
- The id of the SolutionClass to delete.
javax.ejb.FinderException
- If the finder for the SolutionClass references fails.
ObjectNotFoundException
- If the SolutionClass is not found.
PersistenceException
- If the delete operation fails.
ReferentialIntegrityException
- If the SolutionClass object is being used by a Solutionpublic java.util.Collection getAllSolutionClasses() throws ObjectNotFoundException
SolutionClass objects
ObjectNotFoundException
public SolutionClassFieldDefinition createSolutionClassFieldDefinition() throws javax.ejb.CreateException
javax.ejb.CreateException
- If the repository create operation fails.public void saveSolutionClassFieldDefinition(SolutionClassFieldDefinition pSolutionClassFieldDefinition) throws PersistenceException
pSolutionClassFieldDefinition
- The SolutionClassFieldDefinition to save.
PersistenceException
- If the save operation fails.public SolutionClassFieldDefinition getSolutionClassFieldDefinitionById(java.lang.String pId) throws ObjectNotFoundException
pId
- The SolutionClassFieldDefinition repository.
ObjectNotFoundException
- If the SolutionClassFieldDefinition is not found.public void deleteSolutionClassFieldDefinition(java.lang.String pSolutionClassFieldDefinitionId) throws ObjectNotFoundException, javax.ejb.RemoveException
pSolutionClassFieldDefinitionId
- The id of the SolutionClassFieldDefinition to remove.
ObjectNotFoundException
- If the SolutioNClassFieldDefinition is not found.
javax.ejb.RemoveException
- If the delete operation fails.public FieldDefinition getFieldDefinitionById(java.lang.String pFieldDefinitionId) throws ObjectNotFoundException
pFieldDefinitionId
- The id of the field definition to find.
ObjectNotFoundException
- If the field definition could not be found.public FieldDefinition getFieldDefinitionByName(java.lang.String pName) throws ObjectNotFoundException
pName
- The name of the field definition to find.
ObjectNotFoundException
- If the field definition could not be found.public boolean isFieldDefinitionByName(java.lang.String pName)
public FieldDefinition createFieldDefinition(FieldDefinitionType pType) throws javax.ejb.CreateException
javax.ejb.CreateException
- If the FieldDefinition could not be created in the repository.public FieldDefinition createCustomFieldDefinition(FieldDefinitionType pType) throws javax.ejb.CreateException
pType
- The type of custom field to create.
javax.ejb.CreateException
- If the FieldDefinition could not be created in the repository.public void saveFieldDefinition(FieldDefinition pFieldDefinition) throws PersistenceException
pFieldDefinition
- The FieldDefinition to save.
PersistenceException
- If the save operation fails.public java.util.List getVisibleListValues(ListFieldDefinition pFieldDefinition)
pFieldDefinition
- The field definition to get the list values from.
public FieldDefinitionType getFieldDefinitionType(java.lang.String pName)
pName
- The name of the FieldDefinitionType.
public java.lang.String[] getFieldDefinitionTypeTags()
public FieldDefinitionPurpose getFieldDefinitionPurpose(java.lang.String pName)
pName
- The name of the FieldDefinitionPurpose.
public java.lang.String[] getFieldDefinitionPurposeTags()
public FieldDefinitionIndexing getFieldDefinitionIndexing(java.lang.String pName)
pName
- The name of the FieldDefinitionIndexing.
public java.lang.String[] getFieldDefinitionIndexingTags()
public void deleteFieldDefinition(java.lang.String pFieldDefinitionId) throws javax.ejb.FinderException, ObjectNotFoundException, PersistenceException, ReferentialIntegrityException
pFieldDefinitionId
- The id of the FieldDefinition to delete.
javax.ejb.FinderException
- If the finder to get the field definition references fails
ObjectNotFoundException
- If the FieldDefinition is not found.
PersistenceException
- If the FieldDefinition delete operation fails.
ReferentialIntegrityException
- If the FieldDefinition is in use by a SolutionClass and cannot be removedpublic EnumeratedListValue getEnumeratedListValueById(java.lang.String pId) throws ObjectNotFoundException
pId
- The repository id of the EnumeratedListValue.
ObjectNotFoundException
- If the EnumeratedListValue is not found.public EnumeratedListValue createEnumeratedListValue() throws javax.ejb.CreateException
javax.ejb.CreateException
- If the create fails.public boolean isInternalOnlyFieldDefinition(FieldDefinition pFieldDefinition)
pFieldDefinition
- The field definition to test.
public void setDefaultFieldDefinitionExternalAudience(FieldDefinition pFieldDefinition)
pFieldDefinition
- The field definition to add the default segment to.public boolean isStatementField(FieldDefinition pFieldDefinition)
pFieldDefinition
- The FieldDefinition to test.
public void setDefaultValues(java.util.List pValues, FieldDefinition pFieldDefinition) throws javax.ejb.CreateException, javax.ejb.FinderException, PersistenceException, javax.ejb.RemoveException
pFieldDefinition
- The FieldDefinition to set the value(s) on.pValues
- The value(s) to set on the FieldDefinition.
javax.ejb.CreateException
- If the create of a DefaultFieldValue object fails.
javax.ejb.FinderException
- If the finder to get the old defaults fails.
PersistenceException
- If the write of a new values fails.
javax.ejb.RemoveException
- If the remove of any existing values fails.public java.util.List getDefaultValues(FieldDefinition pFieldDefinition) throws javax.ejb.FinderException
pFieldDefinition
- The field definition to get the defaults from.
javax.ejb.FinderException
- If the finder execution fails.public java.util.List getDefaultValues(java.lang.String pFieldName) throws javax.ejb.FinderException
pFieldDefinition
- The field definition to get the defaults from.
DefaultFieldValue
or empty if none is found.
javax.ejb.FinderException
- If the finder execution fails.public void createDefaultFieldValue(FieldDefinition pFieldDefinition, int pDisplayOrder, java.lang.Object pValue) throws javax.ejb.CreateException, PersistenceException
pFieldDefinition
- The field definition the default value belongs to.pValue
- The value.
javax.ejb.CreateException
- If the create of the DefaultFieldValue object fails.
PersistenceException
- If the commit of the DefaultFieldValue object fails.public FieldDefinitionTypeMetadata getBooleanFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getDecimalFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getDateFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getListFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getNumberFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getOrganizationFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getStatementFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getTextFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getTransactionalFragmentFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getUserFieldMetadata() throws ObjectNotFoundException
ObjectNotFoundException
- If no metadata object is found for the type.public FieldDefinitionTypeMetadata getFieldDefinitionMetadataByType(FieldDefinitionType pType) throws ObjectNotFoundException
pType
- The type to find
ObjectNotFoundException
- If a FieldDefinitionTypeMetadata is not found with the given type.public FieldDefinitionTypeMetadata getFieldDefinitionMetadataByType(java.lang.String pName) throws ObjectNotFoundException
pName
- The name of the type to find
ObjectNotFoundException
- If a FieldDefinitionTypeMetadata is not found with the given type name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |