BrightSide Workbench Full Report + Source Code
org.turro.action.IAgreements Interface Reference
Inheritance diagram for org.turro.action.IAgreements:

Public Member Functions

void setContact (IContact contact)
 
void setContact (String idContact)
 
boolean isValid ()
 
boolean canNotify ()
 
boolean canAccess ()
 
boolean canAct (String action)
 
boolean declinedNotifications ()
 
boolean declinedAccessing ()
 
void sendIfNecessary (IConstructor constructor)
 
boolean canSendEmails (NotificationCategory nc)
 
String getPendingAccessURL ()
 
String getPendingActURL (String action)
 

Static Public Member Functions

static boolean checkAgreements (HttpServletRequest request, HttpServletResponse response) throws IOException
 

Public Attributes

String AGREE_CHECKED = "AGREE_CHECKED"
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 33 of file IAgreements.java.

Member Function Documentation

◆ canAccess()

boolean org.turro.action.IAgreements.canAccess ( )

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ canAct()

boolean org.turro.action.IAgreements.canAct ( String  action)

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ canNotify()

boolean org.turro.action.IAgreements.canNotify ( )

◆ canSendEmails()

boolean org.turro.action.IAgreements.canSendEmails ( NotificationCategory  nc)

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ checkAgreements()

static boolean org.turro.action.IAgreements.checkAgreements ( HttpServletRequest  request,
HttpServletResponse  response 
) throws IOException
static

Definition at line 50 of file IAgreements.java.

50  {
51  String url = request.getRequestURL().toString();
52  HttpSession session = request.getSession(true);
53  if(session.getAttribute(Contacts.LOGGED_ICONTACT) != null &&
54  !Boolean.TRUE.equals(session.getAttribute(IAgreements.AGREE_CHECKED)) &&
55  !url.contains("/user/myagreements")) {
56  IAgreements agreements = Plugins.loadImplementation(IAgreements.class, "agreements");
57  if(agreements != null) {
58  agreements.setContact((IContact) session.getAttribute(Contacts.LOGGED_ICONTACT));
59  if(!agreements.canAccess()) {
60  response.sendRedirect(ElephantContext.getRootWebPath() + agreements.getPendingAccessURL());
61  return false;
62  } else {
63  session.setAttribute(IAgreements.AGREE_CHECKED, Boolean.TRUE);
64  }
65  }
66  }
67  return true;
68  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ declinedAccessing()

boolean org.turro.action.IAgreements.declinedAccessing ( )

◆ declinedNotifications()

boolean org.turro.action.IAgreements.declinedNotifications ( )

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ getPendingAccessURL()

String org.turro.action.IAgreements.getPendingAccessURL ( )

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ getPendingActURL()

String org.turro.action.IAgreements.getPendingActURL ( String  action)

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ isValid()

boolean org.turro.action.IAgreements.isValid ( )

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ sendIfNecessary()

void org.turro.action.IAgreements.sendIfNecessary ( IConstructor  constructor)

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ setContact() [1/2]

void org.turro.action.IAgreements.setContact ( IContact  contact)

Implemented in org.turro.agreements.AgreementsPlugin.

Here is the caller graph for this function:

◆ setContact() [2/2]

void org.turro.action.IAgreements.setContact ( String  idContact)

Member Data Documentation

◆ AGREE_CHECKED

String org.turro.action.IAgreements.AGREE_CHECKED = "AGREE_CHECKED"

Definition at line 35 of file IAgreements.java.


The documentation for this interface was generated from the following file: