com.cassinidivision.oce.navigation
Class N_WebSite

java.lang.Object
  extended bycom.webobjects.eocontrol.EOCustomObject
      extended bycom.webobjects.eocontrol.EOGenericRecord
          extended bycom.cassinidivision.oce.navigation.base._N_WebSite
              extended bycom.cassinidivision.oce.navigation.N_WebSite
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_WebSite
extends com.cassinidivision.oce.navigation.base._N_WebSite
implements SiteSectionCommonInterface

Business class for representing web sites.

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_WebSite()
          Default Constructor
 
Method Summary
 void awakeFromInsertion(EOEditingContext ec)
          Creates and inserts the default top-level section for this site.
 String displayKey()
          Returns the key to use when displaying a list of N_WebSite objects in a user interface.
 String indexURL()
          Retrieves the index URL from the top-level section.
 NSArray orderedRootSections()
          Returns a sorted list of root sections.
 NSArray rootSectionPaths()
          Builds an array of section paths for all sections in this site.
 NSArray rootSections()
          Returns a list of root sections.
 NSArray sectionsWithMetaSection(C_MetaSection aMetaSection)
          Fetches all sections allowing the given metasection, using the editing context of the receiver.
 NSArray sectionsWithMetaSectionInEditingContext(C_MetaSection aMetaSection, EOEditingContext anEditingContext)
          Fetches all sections allowing the given metasection.
 NSArray sectionsWithMetaSections(NSArray metaSections)
          Fetches the complete list of sections which are granted any of the given metasections.
 N_Section sectionWithName(String aName)
          Locates the first section with the given name within this site.
 N_Section sectionWithSectionPath(String sectionPath)
          Locates and returns the section with the given path.
 void setIndexURL(String indexURL)
          Sets the index URL for the top-level section.
static N_WebSite webSiteWithNameInEditingContext(String aName, EOEditingContext ec)
          Fetch the web site with the given name.
 String woTemplateName()
          Null-safe wrapper around _N_WebSite.woTemplate().templateName().
 
Methods inherited from class com.cassinidivision.oce.navigation.base._N_WebSite
addToDomainNames, addToSections, domainNames, indexFilename, name, organisation, removeFromDomainNames, removeFromSections, sections, setDomainNames, setIndexFilename, setName, setOrganisation, setSections, setTopLevelSection, setWoTemplate, topLevelSection, 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, 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
name
 

Constructor Detail

N_WebSite

public N_WebSite()
Default Constructor

Method Detail

webSiteWithNameInEditingContext

public static N_WebSite webSiteWithNameInEditingContext(String aName,
                                                        EOEditingContext ec)
Fetch the web site with the given name.

Parameters:
aName - The name to search for.
ec - The editing context for the fetch.
Returns:
The web site located.

awakeFromInsertion

public void awakeFromInsertion(EOEditingContext ec)
Creates and inserts the default top-level section for this site.

Called automatically by EOF, do not invoke directly.

Specified by:
awakeFromInsertion in interface EOEnterpriseObject
See Also:
EOEnterpriseObject.awakeFromInsertion(com.webobjects.eocontrol.EOEditingContext)

displayKey

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

Returns:
The appropriate key.

rootSectionPaths

public NSArray rootSectionPaths()
Builds an array of section paths for all sections in this site.

Returns:
The array of section paths.

sectionWithName

public N_Section sectionWithName(String aName)
Locates the first section with the given name within this site.

Parameters:
aName - The name of the section to hunt for.
Returns:
The section found, or null.

sectionsWithMetaSectionInEditingContext

public NSArray sectionsWithMetaSectionInEditingContext(C_MetaSection aMetaSection,
                                                       EOEditingContext anEditingContext)
Fetches all sections allowing the given metasection.

Parameters:
aMetaSection - The metasection in question.
anEditingContext - The editing contect for the fetch.
Returns:
The list of sections found.

sectionsWithMetaSection

public NSArray sectionsWithMetaSection(C_MetaSection aMetaSection)
Fetches all sections allowing the given metasection, using the editing context of the receiver.

Parameters:
aMetaSection - The metasection in question.
Returns:
The list of sections found.

sectionsWithMetaSections

public NSArray sectionsWithMetaSections(NSArray metaSections)
Fetches the complete list of sections which are granted any of the given metasections.

Parameters:
metaSections - The list of metasections.
Returns:
The list of sections found.

sectionWithSectionPath

public N_Section sectionWithSectionPath(String sectionPath)
Locates and returns the section with the given path.

Note that this method can be slow for sites with many sections which have not previously been loaded, as all sections will be faulted in during execution.

Parameters:
sectionPath - The path of the section being looking for.
Returns:
The section found, or null.

rootSections

public NSArray rootSections()
Returns a list of root sections. A root section is one that has just one path component, such as "/news".

Returns:
The list of root sections.

orderedRootSections

public NSArray orderedRootSections()
Returns a sorted list of root sections.

Returns:
The list of root sections.

woTemplateName

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

Returns:
The name of the template, or the empty string "".

setIndexURL

public void setIndexURL(String indexURL)
Sets the index URL for the top-level section.

Parameters:
indexURL - String representing the index URL.

indexURL

public String indexURL()
Retrieves the index URL from the top-level section.

Specified by:
indexURL in interface SiteSectionCommonInterface
Returns:
String representing the index URL.