public class SearchRestriction extends TypeManagerManaged
personalization| Modifier and Type | Class and Description |
|---|---|
static interface |
SearchRestriction.SearchRestrictionImpl
interface to persistence layer
|
TypeManagerManaged.TypeManagerManagedImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE |
static String |
CODE |
static String |
NAME |
static String |
PRINCIPAL |
static String |
QUERY |
static String |
RESTRICTEDTYPE |
static String |
RESTRICTION_TYPE_ALIAS |
AUTOCREATE, DEPRECATED, EXTENSION_NAME, GENERATELANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
SearchRestriction() |
getAllNames, getAllNames, getExtensionName, getImpl, isAutocreate, isDeprecated, isGenerate, setAllNames, setAllNames, setAutocreate, setExtensionName, setGenerategetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, checkRemovable, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getDefaultAttributeModes, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenantpublic static final String NAME
public static final String CODE
public static final String ACTIVE
public static final String QUERY
public static final String PRINCIPAL
public static final String RESTRICTEDTYPE
public static final String RESTRICTION_TYPE_ALIAS
protected SearchRestriction.SearchRestrictionImpl impl()
protected SearchRestriction createEntity(Principal principal, ComposedType restrictedType, String query, String code, Boolean active) throws ConsistencyCheckException
ConsistencyCheckExceptionprotected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap atts) throws JaloBusinessException, JaloInvalidParameterException
ItemComposedType.newInstance(Map).
In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
Sn example:
public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
// here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
super.getNonInitialAttributes( ctx, allAttributes );
// remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
createItem in class Itemctx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedJaloInvalidParameterExceptionprotected Item.ItemAttributeMap getNonInitialAttributes(SessionContext ctx, Item.ItemAttributeMap allAttributes)
ItemItem.createItem(SessionContext, ComposedType, ItemAttributeMap).
use it like this:
protected ItemAttributeMap getNonInitialAttributes( SessionContext ctx, ItemAttributeMap allAttributes ) {
// let all superclasses remove their intial attributes too final ItemAttributeMap attributes =
super.getNonInitialAttributes( ctx, allAttributes ); // remove own initial attributes here attributes.remove(
MyItem.MY_INITIAL_ATTR ); return ret; }
it is vital to optain the map via super.getNonInitialAttributes and pass it on as such since this
ensures that attribute qualifiers are treated case insensitive!getNonInitialAttributes in class Itemctx - session context with language = NULLallAttributes - a ItemAttributeMap contaning attribute values.ItemAttributeMap containing all attribute values, which belong to non-initial attributes.public String getCode(SessionContext ctx)
public String getCode()
public void setCode(SessionContext ctx, String code)
public void setCode(String code)
public boolean isActive()
public void setActive(boolean active)
public String getName(SessionContext ctx)
getName in class TypeManagerManagedctx - the session context specifying the language to get the name forpublic String getName()
getName in class TypeManagerManagedpublic Map getAllName(SessionContext ctx)
public Map getAllName()
public void setName(SessionContext ctx, String name)
TypeManagerManagedsetName in class TypeManagerManagedctx - the session context defining the language to change the name forname - the new namepublic void setName(String name)
TypeManagerManagedsetName in class TypeManagerManagedname - the new namepublic void setAllName(SessionContext ctx, Map names)
public void setAllName(Map names) throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic String getQuery(SessionContext ctx)
public String getQuery()
public void setQuery(SessionContext ctx, String query) throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic void setQuery(String query) throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic ComposedType getRestrictionType(SessionContext ctx)
public ComposedType getRestrictionType()
public void setRestrictionType(SessionContext ctx, ComposedType type)
public void setRestrictionType(ComposedType type)
public Principal getPrincipal(SessionContext ctx)
public Principal getPrincipal()
public void setPrincipal(SessionContext ctx, Principal p)
public void setPrincipal(Principal p)
@Deprecated public Set<ComposedType> getExcludedSubtypes()
These restrictions must have the exactly the same code but are assigned to subtypes of the original restriction.
Within FlexibleSearch queries all these subtypes are excluded from the original restriction considering that their own restrictions are inserted too.
public String toString()
ItemString representation of this item. This is by default the representation of the primary
key of this item.public String exportXMLDefinition(XMLOutputter xout)
exportXMLDefinition in class TypeManagerManagedprotected void checkRestrictionQuery(ComposedType restrictedType, String query) throws JaloInvalidParameterException
JaloInvalidParameterExceptionpublic static void checkUniqueCodeTypePrincipal(Principal principal, ComposedType type, String code)
principal - the principaltype - the typecode - the codeCopyright © 2017 SAP SE. All Rights Reserved.