Adding a page to eDocs

Michael May added Safety Docs to the OLCI PDF's with the help of Eric Filman.  He applied changes to the following classes:

hal-ejb/src/main/config/chip/EdocsI18NMapping.xml
hal-ejb/src/main/java/com/hollandamerica/checkin/action/EdocsAction.java
hal-ejb/src/main/java/com/hollandamerica/checkin/action/EdocsHelper.java
hal-ejb/src/main/java/com/hollandamerica/common/biz/EdocsI18NHelper.java

See attachment for detail.

Word Doc:  20120806_Using_iText_to_Insert_PDF_pages.doc

Create a SpringApplicationContext service for legacy code

Guillaume applied changes to "Delete WebCryptography. Have all code use the EncryptionService instead. Also create a SpringApplicationContext service so that legacy code (where instances are not created by spring) can access the spring application context and lookup beans."

hal-ejb/src/main/java/com/hal/sf/service/SpringApplicationContext.java

SpringApplicationContext.java

Code using the above legacy class, need the following:

Declarations

import com.hal.sf.service.SpringApplicationContext;
import com.hollandamerica.common.encryption.EncryptionService;
private EncryptionService encryptionService;

Inside Construction

encryptionService =(EncryptionService) SpringApplicationContext.getBean("encryptionService");

Sample Code Usage

String newCCN = encryptionService.decrypt(encrypted);
String previousCCN = encryptionService.decrypt(previous);

New pattern to toggle features in JSP

From: Thompson, Sonya (HAL)
Sent: Thursday, May 24, 2012 9:19 AM
To: Ruckman, Maurice (HAL); Fillman, Eric (HAL); Phatak, Sheetal (HAL); Klein, Brian (HAL); Bojja, Sridhar (HAL Contractor)
Cc: Augustine, Anila (HAL)
Subject: RE: New feature to toggle features in JSP

I've also created a FeatureToggleHelper.java with getFeatureToggle() and getFeatureToggleAsString() methods.
This helper knows where the featureToggles.xml file is located & appends the "toggles.{environment}." To the front of whatever key is passed in.
However, this will not be avail until I merge it into 12.23

From: Ruckman, Maurice (HAL)
Sent: Thursday, May 24, 2012 7:31 AM
To: Fillman, Eric (HAL); Thompson, Sonya (HAL); Phatak, Sheetal (HAL); Klein, Brian (HAL); Bojja, Sridhar (HAL Contractor)
Cc: Augustine, Anila (HAL)
Subject: RE: New feature to toggle features in JSP

To supplement this effort, here is an example of how to access our XML in the back-end Java code to drive logic:
Refer: hal-ejb/src/main/java/com/hal/sf/olci/page/AcceptPrintTermsPage.java

if ( StaticXmlDataList.getInstance().getStaticXmlFileMap().get(
"web.copy.olci.acceptTerms_logic.xml" ).get(
"page.EUTerms." + guestCountry ) != null )
{
setEuropeanUnion( true );
}
else
{
setEuropeanUnion( false );
}
From: Fillman, Eric (HAL)
Sent: Friday, May 18, 2012 4:09 PM
To: Thompson, Sonya (HAL); Phatak, Sheetal (HAL); Ruckman, Maurice (HAL); Klein, Brian (HAL); Bojja, Sridhar (HAL Contractor)
Cc: Augustine, Anila (HAL)
Subject: New feature to toggle features in JSP

Hi.

Sonya and I put together a little process that will allow you to control when a new feature or new code will be used.
It starts with a  file in Teamsite called featureToggles.xml, and it's in the web/copy/features directory.

Here's a very condensed sample of what the file looks like:

<toggles>

<!-- Use the following section to control how features will be enabled in the non-production environments -->

<nonProd>
<displayGroupExcursions><![CDATA[true]]></displayGroupExcursions>
</nonProd>

<!-- Use the following section to control how features will be enabled in the PRODUCTION environment -->

<prod>
<displayGroupExcursions><![CDATA[false]]></displayGroupExcursions>
</prod>

</toggles>

Essentially there are two sections - <nonProd> and <prod>.  <prod> would be used for production, <nonProd> will be used for everything else.  Within each you define an element and indicate whether that feature will be used/displayed/etc. within the JSP.  In the example above, <displayGroupExcursions> can be used to control the group excursion functionality.  It's currently set to true for nonProd so group excursion features will display there, but false for prod.

This way we can push code to dev, test, and prod, and have the features available in dev and test, but not prod.  Once the OK is given for prod, we just need to change the XML and push that through Teamsite.  If we need to shut a feature off for some reason in prod, we can do that too.

To use the featureToggles.xml, you just need to include a reference to it in the JSP like we do for all the static content XML files:

<s:set var="featureMap" value="#application.staticXmlDataList.staticXmlFileMap['web.copy.features.featureToggles.xml']"/>

Then in the JSP code, add an if statement to check the value of your feature name:

<s:if test="#featureMap['toggles.' + featureEnv + '.displayGroupExcursions'] == 'true'">
<!-- These are Group Excursions!-->
<s:if test="%{!getShxGroupTourBizList().isEmpty()}">

// Do something here

</s:if>
</s:if>

Notice the featureEnv variable in the highlighted line above.  We added a method to the BaseAction class called getFeatureEnv() that will return a string value of either nonProd or prod depending on the environment variable set in the System Properties.  If environment is prd, it returns prod, otherwise it returns nonProd.  As long as your JSP is called from an Action that extends BaseAction (which I think everything is the new flows do), your JSP should have access to featureEnv.

You should also be capable of accessing the XML file directly from an action if you want to control which methods are being called from a service or something, but we didn't get that far with it.

The code is in 12.21-RC, so it should go to prod next week.

Let me or Sonya know if you have any questions.

Thanks.

Eric

Example to turn off features

From: Thompson, Sonya (HAL)
Sent: Thursday, May 03, 2012 2:37 PM
To: Fillman, Eric (HAL); Bojja, Sridhar (HAL Contractor); Phatak, Sheetal (HAL); Ruckman, Maurice (HAL); Klein, Brian (HAL); Hartman, Mario (HAL Contractor); Florencia Castro (fcastro@hexacta.com); Daniela Greca (dgreca@hexacta.com)
Cc: Augustine, Anila (HAL)
Subject: Created a new teamsite file in support of continuous integration

Dev team,

In support of continuous integration, here's a way to "turn a feature off" or "hide a feature from end users".

Add an element to this new teamsite file: //prdcms01/default/main/hollandamerica/WORKAREA/baseline/cms/web/copy/features/featureToggles.xml

<?xml version="1.0" encoding="utf-8"?>
<toggles>
<cancelFeeDetailsDE><![CDATA[false]]></cancelFeeDetailsDE>
<upsellCategories_hal><![CDATA[true]]></upsellCategories_hal>
<upsellCategories_sbn><![CDATA[true]]></upsellCategories_sbn>
</toggles>

In your JSP, import the teamsite file:
<s:set var="featureMap" value="#application.staticXmlDataList.staticXmlFileMap['web.copy.features.featureToggles.xml']"/>

Add an if statement around the new feature in your JSP:
<s:if test="#featureMap['toggles.upsellCategories_hal'] == 'true'">
<%--put your feature code here-->
</s:if>

XStart Support Tickets

-----Original Message-----
From: Schumacher, Mike (HAL)
Sent: Thursday, February 16, 2012 9:53 AM
To: 'Guillaume Radde'
Cc: Augustine, Anila (HAL); Thompson, Sonya (HAL); Ruckman, Maurice (HAL)
Subject: RE: Xmanager

Yes, we have support. You can open a ticket at http://www.netsarang.com/support/request_form.html if you need my help let me know. I actually think I had this problem yesterday.

Mike

-----Original Message-----
From: Guillaume Radde [mailto:guillaume.radde@redhat.com]
Sent: Thursday, February 16, 2012 9:37 AM
To: Schumacher, Mike (HAL)
Cc: Augustine, Anila (HAL); Thompson, Sonya (HAL); Ruckman, Maurice (HAL)
Subject: Re: Xmanager

Mike, do we have any kind of support with XManager? Developers are having issues where Xmanager locks up if they don't touch the Window for a few hours.

Guillaume

----- Original Message -----
From: "Maurice Ruckman (HAL)" <MRuckman@HollandAmerica.com>
To: "Sonya Thompson (HAL)" <SThompson@HollandAmerica.com>
Cc: "Guillaume Radde" <guillaume.radde@redhat.com>, "Anila Augustine (HAL)" <AAugustine@HollandAmerica.com>
Sent: Thursday, February 16, 2012 9:57:40 AM
Subject: Xmanager

FYI -- I installed the latest version of Xmanager and kept my VM open overnight and it still stopped working, and effectively locked-up on my machine.

Thanks,

Maurice Ruckman
Voice: (206) 626-7497 x67497
Cellular: (206) 650-7576

Dummy Credit Cards

Attachment:

Dummy test credit cards

From: Mounagurusamy, Jayakumar (HAL)
Sent: Wednesday, December 14, 2011 12:47 PM
To: HAL DistList: IT Website Team
Subject: Emailing: Dummy test credit cards

The attached document has the dummy credit card and expected results that can used in webdev and  webtst environments. This document is also available at below SharePoint location.

Link to Sharepoint

Your message is ready to be sent with the following file or link attachments:

Dummy test credit cards

Note: To protect against computer viruses, e-mail programs may prevent sending or receiving certain types of file attachments.  Check your e-mail security settings to determine how attachments are handled.

Understanding Style Precedence in CSS

Refer: link [pdf]

Specificity is calculated by counting various components of your css and expressing them in a form (a,b,c,d). This will be clearer with an example, but first the components.

  • Element, Pseudo Element: d = 1 – (0,0,0,1)
  • Class, Pseudo class, Attribute: c = 1 – (0,0,1,0)
  • Id: b = 1 – (0,1,0,0)
  • Inline Style: a = 1 – (1,0,0,0)

An id is more specific than a class is more specific than an element.