Refactor portletMode parsing and support LiferayPortletMode
Refactor windowState parsing and support LiferayWindowState