com.cassinidivision.oce.navigation
Class N_Section

java.lang.Object
  extended bycom.webobjects.eocontrol.EOCustomObject
      extended bycom.webobjects.eocontrol.EOGenericRecord
          extended bycom.cassinidivision.oce.navigation.base._N_Section
              extended bycom.cassinidivision.oce.navigation.N_Section
All Implemented Interfaces:
_EOPrivateMemento, EODeferredFaulting, EOEnterpriseObject, EOFaulting, EOKeyValueCoding, EOKeyValueCoding._BestBindingCreation._ForwardingBindingCheck, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCodingAdditions, EORelationshipManipulation, EOValidation, NSKeyValueCoding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._ReflectionKeyBindingCreation.Callback, NSKeyValueCoding.ErrorHandling, NSKeyValueCodingAdditions, NSValidation, Serializable, SiteSectionCommonInterface

public class N_Section
extends com.cassinidivision.oce.navigation.base._N_Section
implements SiteSectionCommonInterface

A business class encapsulating the notion of a website "section".

Note that all rendering is handled relative to a given section, and that every web site has a top-level section representing the path "/".

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.webobjects.eocontrol.EOGenericRecord
EOGenericRecord._DictionaryBinding, EOGenericRecord._LazyDictionaryBinding
 
Nested classes inherited from class com.webobjects.eocontrol.EOCustomObject
EOCustomObject._BooleanFieldBinding, EOCustomObject._FieldBinding, EOCustomObject._LazyFieldBinding, EOCustomObject._NumberFieldBinding
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueCodingAdditions
EOKeyValueCodingAdditions.DefaultImplementation, EOKeyValueCodingAdditions.Utility
 
Nested classes inherited from class com.webobjects.foundation.NSKeyValueCoding
NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.Null, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessor
 
Nested classes inherited from class com.webobjects.eocontrol.EOKeyValueCoding
EOKeyValueCoding._BestBindingCreation, EOKeyValueCoding._KeyBindingCreation, EOKeyValueCoding._StoredForwardingBinding
 
Nested classes inherited from class com.webobjects.foundation.NSValidation
NSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException
 
Nested classes inherited from class com.webobjects.eocontrol._EOPrivateMemento
_EOPrivateMemento.DefaultImplementation
 
Field Summary
 
Fields inherited from class com.webobjects.eocontrol.EOGenericRecord
_CLASS
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCodingAdditions
_KeyPathSeparatorChar, KeyPathSeparator
 
Fields inherited from interface com.webobjects.foundation.NSKeyValueCoding
NullValue
 
Constructor Summary
N_Section()
          Default constructor.
 
Method Summary
static NSArray allSectionsWithMetaSection(C_MetaSection aMetaSection, EOEditingContext ec)
          Loads and returns all sections which are granted with the given metasection.
 int compareBySiteAndName(N_Section anotherSection)
          A comparison method comparing first the website names, and then, if equal, the section names.
 String displayKey()
          Retrieves the key to use when displaying a list of N_Section objects in a user interface.
 String metaSectionNameList()
          Builds a ", " separated list of names of metasections allowed in this section.
 NSArray orderedChildren()
          Builds an ordered list of child sections, ordered numerically by the "ordering" attribute.
 String sectionPath()
          Builds the path to this section, including the names of all parents, delimiting the names with "/".
 NSArray sectionsWithIndexFeature(C_Feature aFeature, EOEditingContext ec)
          Fetches and returns all sections which use the given feature as their index feature.
 N_Template sectionTemplate()
          Locates the template to use when rendering this section.
static N_Section sectionWithMetaSection(C_MetaSection aMetaSection, EOEditingContext ec)
          Loads and returns one of the sections which is granted the given metasection.
static N_Section sectionWithMetaSectionInSite(C_MetaSection aMetaSection, N_WebSite aSite, EOEditingContext anEditingContext)
          Loads and returns one of the sections in the given site which is granted the given metasection.
static N_Section sectionWithSectionPathInSite(String aSectionPath, N_WebSite aSite, EOEditingContext anEditingContext)
          Retrieves the section for the given section path and site, using the given editing context.
 NSMutableArray selfAndAllParents()
          Builds a list containing this object and all ancestors in the section tree.
 String woTemplateName()
          Null-safe convenience wrapper around woTemplate().templateName()
 
Methods inherited from class com.cassinidivision.oce.navigation.base._N_Section
addToChildren, addToMetaSections, children, indexURL, metaSections, name, ordering, parent, removeFromChildren, removeFromMetaSections, sectionDescription, setChildren, setIndexURL, setMetaSections, setName, setOrdering, setParent, setSectionDescription, setUserInfoData, setWebSite, setWoTemplate, userInfoData, webSite, woTemplate
 
Methods inherited from class com.webobjects.eocontrol.EOGenericRecord
__setClassDescription, _keyGetBindingForKey, _keySetBindingForKey, _otherStorageBinding, _storedKeyGetBindingForKey, _storedKeySetBindingForKey, classDescription, usesDeferredFaultCreation
 
Methods inherited from class com.webobjects.eocontrol.EOCustomObject
__classDescription, __clearPendingChanges, __editingContext, __globalID, __hasAuxillaryObservers, __hasPendingChanges, __hasPendingUpdate, __isInitialized, __isPendingDeletion, __isPendingInsertion, __isShared, __lastSnapshot, __originalSnapshot, __retainCount, __setAuxillaryObservers, __setEditingContext, __setGlobalID, __setInitialized, __setLastSnapshot, __setOriginalSnapshot, __setPendingDeletion, __setPendingInsertion, __setPendingUpdate, __setRetainCount, __setShared, _createKeyGetBindingForKey, _createKeySetBindingForKey, _createStoredKeyGetBindingForKey, _createStoredKeySetBindingForKey, _fieldKeyBinding, _forwardingBindingNeededForClass, _methodKeyGetBinding, _methodKeySetBinding, addObjectToBothSidesOfRelationshipWithKey, addObjectToPropertyWithKey, allPropertyKeys, attributeKeys, awakeFromClientUpdate, awakeFromFetch, awakeFromInsertion, canAccessFieldsDirectly, changesFromSnapshot, classDescriptionForDestinationKey, clearFault, clearProperties, deleteRuleForRelationshipKey, editingContext, entityName, eoDescription, eoShallowDescription, equals, faultHandler, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hashCode, inverseForRelationshipKey, invokeRemoteMethod, isFault, isToManyKey, opaqueState, ownsDestinationObjectsForRelationshipKey, prepareValuesForClient, propagateDeleteWithEditingContext, reapplyChangesFromDictionary, removeObjectFromBothSidesOfRelationshipWithKey, removeObjectFromPropertyWithKey, shouldUseStoredAccessors, snapshot, storedValueForKey, takeStoredValueForKey, takeValueForKey, takeValueForKeyPath, takeValuesFromDictionary, takeValuesFromDictionaryWithMapping, toManyRelationshipKeys, toOneRelationshipKeys, toString, turnIntoFault, unableToSetNullForKey, updateFromSnapshot, userPresentableDescription, validateClientUpdate, validateForDelete, validateForInsert, validateForSave, validateForUpdate, validateTakeValueForKeyPath, validateValueForKey, valueForKey, valueForKeyPath, valuesForKeys, valuesForKeysWithMapping, willChange, willRead, willReadRelationship
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.cassinidivision.oce.navigation.SiteSectionCommonInterface
indexURL, name
 

Constructor Detail

N_Section

public N_Section()
Default constructor.

Method Detail

sectionWithMetaSectionInSite

public static N_Section sectionWithMetaSectionInSite(C_MetaSection aMetaSection,
                                                     N_WebSite aSite,
                                                     EOEditingContext anEditingContext)
Loads and returns one of the sections in the given site which is granted the given metasection.

Parameters:
aMetaSection - The metasection required.
aSite - The site to search.
anEditingContext - The editing context for the fetch.
Returns:
The section located.

sectionWithMetaSection

public static N_Section sectionWithMetaSection(C_MetaSection aMetaSection,
                                               EOEditingContext ec)
Loads and returns one of the sections which is granted the given metasection.

Parameters:
aMetaSection - The metaSection required.
ec - The editing context for the fetch.
Returns:
The section located.

allSectionsWithMetaSection

public static NSArray allSectionsWithMetaSection(C_MetaSection aMetaSection,
                                                 EOEditingContext ec)
Loads and returns all sections which are granted with the given metasection.

Parameters:
aMetaSection - The metaSection required.
ec - The editing context for the fetch.
Returns:
An array of sections located.

sectionWithSectionPathInSite

public static N_Section sectionWithSectionPathInSite(String aSectionPath,
                                                     N_WebSite aSite,
                                                     EOEditingContext anEditingContext)
Retrieves the section for the given section path and site, using the given editing context.

Parameters:
aSectionPath - The path of the section we're looking for.
aSite - The site to search.
anEditingContext - The editing context into which to bring the located section.
Returns:
The section located.

metaSectionNameList

public String metaSectionNameList()
Builds a ", " separated list of names of metasections allowed in this section.

Returns:
The list of names.

orderedChildren

public NSArray orderedChildren()
Builds an ordered list of child sections, ordered numerically by the "ordering" attribute.

Returns:
The sorted list.

sectionsWithIndexFeature

public NSArray sectionsWithIndexFeature(C_Feature aFeature,
                                        EOEditingContext ec)
Fetches and returns all sections which use the given feature as their index feature.

Parameters:
aFeature - The feature to look for.
ec - The editing context for the fetch.
Returns:
The list of sections found.

compareBySiteAndName

public int compareBySiteAndName(N_Section anotherSection)
A comparison method comparing first the website names, and then, if equal, the section names.

Parameters:
anotherSection - The section to compare against this one.
Returns:
The comparison result (-1, 0 or 1).

sectionTemplate

public N_Template sectionTemplate()
Locates the template to use when rendering this section.

This is done by ascending the section tree until a section or web site is found which specifies a template.

Returns:
The template located.

woTemplateName

public String woTemplateName()
Null-safe convenience wrapper around woTemplate().templateName()

Returns:
The name of the related template, or "" if the template is null.

displayKey

public String displayKey()
Retrieves the key to use when displaying a list of N_Section objects in a user interface.

Returns:
The appropriate key.

selfAndAllParents

public NSMutableArray selfAndAllParents()
Builds a list containing this object and all ancestors in the section tree.

Returns:
Array of sections.

sectionPath

public String sectionPath()
Builds the path to this section, including the names of all parents, delimiting the names with "/".

Note that the top-level section does not contribute its name; every web site has one nameless "root" section at the path "/".

Returns:
The path