Class EditMemberPhotoHandler

  • All Implemented Interfaces:
    JcmsConstants, JaliosConstants

    public class EditMemberPhotoHandler
    extends EditMemberHandler
    This form handler processes Member photo.
    $Revision: 133355 $
    Kevin Bransard
    • Field Detail

      • opExisting

        protected boolean opExisting
      • useCurrentMemberPhoto

        protected boolean useCurrentMemberPhoto
      • x1

        protected int x1
      • y1

        protected int y1
      • x2

        protected int x2
      • y2

        protected int y2
      • width

        protected int width
      • height

        protected int height
      • member

        protected Member member

        protected static final java.lang.String MBRID_HTML_PARAM
        The parameter name used to transfert the id of the Member for which the photo is edited.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EditMemberPhotoHandler

        public EditMemberPhotoHandler()
    • Method Detail

      • processAction

        public boolean processAction()
        Description copied from class: JcmsFormHandler
        Method to be implemented to check/validate action to be performed and process them.

        Default implementation is to return false. No need to call super method.

        This method may NOT be invoked at all if security validation are not met.

        You must ensure your handler and JSP can work properly without any code invoked in this method.

        processAction in class EditMemberHandler
        false if no redirection is needed, true otherwise
        Throws: - IO Exception
      • validateNext

        protected boolean validateNext()
        validateNext in class JcmsFormHandler
      • getFormStepCount

        public int getFormStepCount()
        Description copied from class: JcmsFormHandler
        Retrieve the total number of steps used for edition when invoking this form handler.

        The default implementation of this method is to return 1, corresponding to one step (which means only 1 screen being displayed).

        You can provide a custom FormHandler to override this behavior.

        See jcore/doSteps.jspf for use of this method.

        getFormStepCount in class JcmsFormHandler
        the total number of steps in this formhandler
      • showPreviousButton

        public boolean showPreviousButton()
        Description copied from class: JcmsFormHandler
        Check if the "Previous" button should be displayed in step modal form.

        The default implementation of this method is to return true if the current step (as returned by JcmsFormHandler.getFormStep() is higher than 0.

        You can provide a custom FormHandler to override this behavior.

        See jcore/doStepButtons.jspf for use of this method.

        showPreviousButton in class JcmsFormHandler
        true to display the "Previous" button, false to hide it
      • performFinish

        protected boolean performFinish()
        performFinish in class JcmsFormHandler
      • getWorkFile

        public getWorkFile()
        Retrieve the File instance of the current photo being edited.

        ALWAYS return a temporary file which can be safely deleted.

        a File instance or null if work file was not properly initalized
      • setOpExisting

        public void setOpExisting​(java.lang.String opExisting)
      • setUseCurrentMemberPhoto

        public void setUseCurrentMemberPhoto​(boolean useCurrentMemberPhoto)
      • useCurrentMemberPhoto

        public boolean useCurrentMemberPhoto()
        true if user has asked to use his existing photo
      • getAvailableX1

        public int getAvailableX1()
      • getAvailableY1

        public int getAvailableY1()
      • getAvailableX2

        public int getAvailableX2()
      • getAvailableY2

        public int getAvailableY2()
      • getAvailableWidth

        public int getAvailableWidth()
      • getAvailableHeight

        public int getAvailableHeight()
      • setX1

        public void setX1​(java.lang.String x1)
      • setY1

        public void setY1​(java.lang.String y1)
      • setX2

        public void setX2​(java.lang.String x2)
      • setY2

        public void setY2​(java.lang.String y2)
      • setWidth

        public void setWidth​(java.lang.String width)
      • setHeight

        public void setHeight​(java.lang.String height)
      • setMbrId

        public void setMbrId​(java.lang.String mbrId)
      • setMember

        public void setMember​(Member member)
      • canEdit

        public static boolean canEdit​(Member me,
                                      Member other,
                                      Workspace workspace)
        Return true if a given member can edit the profile info of a given member.
        me - the Member who updates the photo
        other - the Member who's photo will be updated
        workspace - the current Workspace
        true if a given member can edit the profile info of a given member.