[
https://issues.jboss.org/browse/GTNPORTAL-2363?page=com.atlassian.jira.pl...
]
Antoine Herzog updated GTNPORTAL-2363:
--------------------------------------
Description:
Hi,
Today, the location of the sharedlayout.xml file is hardcoded.
The location is : "war:conf/portal/portal/sharedlayout.xml"
See the class file : POMDataStorage.java
**********************
public Container getSharedLayout() throws Exception
{
String path = "war:/conf/portal/portal/sharedlayout.xml";
String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
ByteArrayInputStream is = new
ByteArrayInputStream(out.getBytes("UTF-8"));
IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
UnmarshallingContext uctx =
(UnmarshallingContext)bfact.createUnmarshallingContext();
uctx.setDocument(is, null, "UTF-8", false);
Container container = (Container)uctx.unmarshalElement();
generateStorageName(container);
return container;
}
public void save() throws Exception
{
**********************
This is really not convenient for configuration, and not consistent with the configuration
of the portals : "war:/conf/portal/portal/classic",
"war:/conf/portal/portal/myPortal", etc...
What would be nice is to be able to define where this file is.
This would allow to have consistent configuration location, when we change the path of the
templates of the portals.
This allow to have several path, with diferent config, and change them more cleanly than
copying "the" proper file in the uniquely allowed location.
**********************
place to put this config info ?
This is my guess, if I don't miss anything
A) As it is Portal container level, I guess it coul be set in :
PortalContainerDefinitionPlugin
The corresponding xml file is the /conf/configuration.xml in the config jar.
B) The other location that "looks nice" is in the UserPortalConfigService.
The corresponding xml file is the /conf/myconfig/portal/portal-configuration.xml in the
portal container war.
There, it is in the same file where the location are defined, for the Portal pages and
navigation templates.
C) May be with another component to provide this configuration, that coulb be defined in
the "conf/common/common-configuration.xml" ?
**********************
The A) solution looks ok for me, as configuration setting matter.
even though I did not look at the wiring, in the code, to get it then in the
POMDataStorage, for processing.
**********************
Workaround : put the file in the "conf/portal/portal" folder, even though the
other elements of the config are in "conf/myCustomConfig/...".
Thanks
was:
Hi,
Today, the location of the sharedlayout.xml file is hardcoded.
The location is : "war:conf/portal/portal/sharedlayout.xml"
See the class file : POMDataStorage.java
**********************
public Container getSharedLayout() throws Exception
{
String path = "war:/conf/portal/portal/sharedlayout.xml";
String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
ByteArrayInputStream is = new
ByteArrayInputStream(out.getBytes("UTF-8"));
IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
UnmarshallingContext uctx =
(UnmarshallingContext)bfact.createUnmarshallingContext();
uctx.setDocument(is, null, "UTF-8", false);
Container container = (Container)uctx.unmarshalElement();
generateStorageName(container);
return container;
}
public void save() throws Exception
{
**********************
This is really not convenient for configuration, and not consistent with the configuration
of the portals : "war:/conf/portal/portal/classic",
"war:/conf/portal/portal/myPortal", etc...
What would be nice is to be able to define where this file is.
This would allow to have consistent configuration location, when we change the path of the
templates of the portals.
This allow to have several path, with diferent config, and change them more cleanly than
copying "the" proper file in the uniquely allowed location.
********* place to put this config info ?
This is my guess, if I don't miss anything
A) As it is Portal container level, I guess it coul be set in :
PortalContainerDefinitionPlugin
The corresponding xml file is the /conf/configuration.xml in the config jar.
B) The other location that "looks nice" is in the UserPortalConfigService.
The corresponding xml file is the /conf/myconfig/portal/portal-configuration.xml in the
portal container war.
There, it is in the same file where the location are defined, for the Portal pages and
navigation templates.
C) May be with another component to provide this configuration, that coulb be defined in
the "conf/common/common-configuration.xml" ?
*********
The A) solution looks ok for me, as configuration setting matter.
even though I did not look at the wiring, in the code, to get it then in the
POMDataStorage, for processing.
**********************
Workaround : put the file in the "conf/portal/portal" folder, even though the
other elements of the config are in "conf/myCustomConfig/...".
Thanks
sharedlayout.xml : configurable location path, not hardcoded as
"war:conf/portal/portal/sharedlayout.xml"
---------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-2363
URL:
https://issues.jboss.org/browse/GTNPORTAL-2363
Project: GateIn Portal
Issue Type: Enhancement
Security Level: Public(Everyone can see)
Components: Management
Affects Versions: 3.2.0-CR01
Reporter: Antoine Herzog
Hi,
Today, the location of the sharedlayout.xml file is hardcoded.
The location is : "war:conf/portal/portal/sharedlayout.xml"
See the class file : POMDataStorage.java
**********************
public Container getSharedLayout() throws Exception
{
String path = "war:/conf/portal/portal/sharedlayout.xml";
String out = IOUtil.getStreamContentAsString(confManager_.getInputStream(path));
ByteArrayInputStream is = new
ByteArrayInputStream(out.getBytes("UTF-8"));
IBindingFactory bfact = BindingDirectory.getFactory(Container.class);
UnmarshallingContext uctx =
(UnmarshallingContext)bfact.createUnmarshallingContext();
uctx.setDocument(is, null, "UTF-8", false);
Container container = (Container)uctx.unmarshalElement();
generateStorageName(container);
return container;
}
public void save() throws Exception
{
**********************
This is really not convenient for configuration, and not consistent with the
configuration of the portals : "war:/conf/portal/portal/classic",
"war:/conf/portal/portal/myPortal", etc...
What would be nice is to be able to define where this file is.
This would allow to have consistent configuration location, when we change the path of
the templates of the portals.
This allow to have several path, with diferent config, and change them more cleanly than
copying "the" proper file in the uniquely allowed location.
**********************
place to put this config info ?
This is my guess, if I don't miss anything
A) As it is Portal container level, I guess it coul be set in :
PortalContainerDefinitionPlugin
The corresponding xml file is the /conf/configuration.xml in the config jar.
B) The other location that "looks nice" is in the UserPortalConfigService.
The corresponding xml file is the /conf/myconfig/portal/portal-configuration.xml in the
portal container war.
There, it is in the same file where the location are defined, for the Portal pages and
navigation templates.
C) May be with another component to provide this configuration, that coulb be defined in
the "conf/common/common-configuration.xml" ?
**********************
The A) solution looks ok for me, as configuration setting matter.
even though I did not look at the wiring, in the code, to get it then in the
POMDataStorage, for processing.
**********************
Workaround : put the file in the "conf/portal/portal" folder, even though the
other elements of the config are in "conf/myCustomConfig/...".
Thanks
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira