com.fullspan.kat.service
Class KatSaveEntryService

java.lang.Object
  extended bycom.fullspan.kat.service.KatServiceBase
      extended bycom.fullspan.kat.service.KatSaveEntryService

public class KatSaveEntryService
extends KatServiceBase

Author:
Mitch Stuart

Field Summary
 
Fields inherited from class com.fullspan.kat.service.KatServiceBase
m_executed, m_isAdminSession, m_katRequest
 
Constructor Summary
KatSaveEntryService(IKatRequest katRequest, KatEntry entry)
           
KatSaveEntryService(IKatRequest katRequest, KatEntryFormData entryForm)
           
 
Method Summary
protected  boolean didInheritedPropsChange(KatEntryFormData entryForm)
          If we are updating a category, and certain properties are changed (e.g., visibility, its parent), then we need to update all child entries with the values of these "inherited" properties.
protected  void fetchEntryTree()
           
 KatEntry getEntry()
           
protected  void postServiceCheckAccess()
           
protected  void preServiceCheckAccess()
           
protected  void service()
           
protected  void serviceNonRoot()
           
protected  void setOwnerUser()
           
protected  void updateChildrenInheritedProps()
           
protected  void updateChildrenInheritedProps(KatEntryTreeNode node)
           
protected  void updateInheritedProps(KatEntry parentEntry, KatEntry childEntry)
           
protected  boolean validateEntryType(int entryType)
           
 
Methods inherited from class com.fullspan.kat.service.KatServiceBase
checkAccessToService, checkExecuted, checkThrowErrors, execute, getExecuted, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KatSaveEntryService

public KatSaveEntryService(IKatRequest katRequest,
                           KatEntry entry)

KatSaveEntryService

public KatSaveEntryService(IKatRequest katRequest,
                           KatEntryFormData entryForm)
                    throws KatServiceException
Method Detail

getEntry

public KatEntry getEntry()

preServiceCheckAccess

protected void preServiceCheckAccess()
Specified by:
preServiceCheckAccess in class KatServiceBase

service

protected void service()
                throws KatServiceException
Specified by:
service in class KatServiceBase
Throws:
KatServiceException
See Also:
KatServiceBase.service()

serviceNonRoot

protected void serviceNonRoot()
                       throws KatServiceException
Throws:
KatServiceException

postServiceCheckAccess

protected void postServiceCheckAccess()
Specified by:
postServiceCheckAccess in class KatServiceBase

validateEntryType

protected boolean validateEntryType(int entryType)

didInheritedPropsChange

protected boolean didInheritedPropsChange(KatEntryFormData entryForm)
                                   throws KatServiceException
If we are updating a category, and certain properties are changed (e.g., visibility, its parent), then we need to update all child entries with the values of these "inherited" properties. This is done later, at the end of the service method. However, we need to fetch the entry tree now, before we update the category itself, and save it away for later use. If we wait until after the category is updated, we will not be able to fetch the tree. Because if the category has moved, the tree will not have the child entries that we need, because the children are still under the "old" category location.

Throws:
KatServiceException

fetchEntryTree

protected void fetchEntryTree()
                       throws KatServiceException
Throws:
KatServiceException

updateChildrenInheritedProps

protected void updateChildrenInheritedProps()
                                     throws KatServiceException
Throws:
KatServiceException

updateChildrenInheritedProps

protected void updateChildrenInheritedProps(KatEntryTreeNode node)

updateInheritedProps

protected void updateInheritedProps(KatEntry parentEntry,
                                    KatEntry childEntry)

setOwnerUser

protected void setOwnerUser()
                     throws KatServiceException
Throws:
KatServiceException