Newbie Portlet Deployment Questions

Viewpoint
Enthusiast

Newbie Portlet Deployment Questions

First Question:

I am currently developing portlets using the viewpoint pdk on windows. I am trying to deploy it on the production viewpoint server that is on Linux. To deploy the portlet onto that machine, is it the same as deploying it on my windows machine. I mean in terms of using the build script using ant or is there another way that you deploy them.

Second Question:

Is there a way that I can deploy a portlet on the production server and have it not be visible by anyone except me? I have administrative access if there is a setting to be modified.
14 REPLIES
Enthusiast

Re: Newbie Portlet Deployment Questions

also is there documentation that goes more in depth than the api documentation in terms of explaining what each variable means such as explaining at what point the request collection time is actually computed or explaining a functions return value like when it returns a time and all that is said is that is returns a float but does not say in what format ex. seconds milliseconds.

Thanks
dfu
Teradata Employee

Re: Newbie Portlet Deployment Questions

I'll attempt to answer some of your questions

Q1: You should be able to drop your WAR into the /opt/teradata/viewpoint/viewpoint-working/liferay-autodeploy dir on the production server.

Q2: You can prevent the portlet from showing up for anyone but you by going to: Admin->Roles Manager and creating a role with only your user in it with the portlet enabled.

Q3: The documentation for some of the components are not as robust as we like it. If you can provide the classes and methods you are interested in, I might be able to get some extra details for you.
Enthusiast

Re: Newbie Portlet Deployment Questions

If I put the WAR into there will it cause it to update the server or will i need to restart it for the new portlet to show up?
dfu
Teradata Employee

Re: Newbie Portlet Deployment Questions

The server will update automatically.
Enthusiast

Re: Newbie Portlet Deployment Questions

There is a function in the SessionDAO called getRequestCount that takes the system id and two timestamps. This functions return type is an integer but it says in the API documentation that it returns an iterator for the sessions. Can you clarify this? Does it mean that it can return an iterator for all the sessions that made requests between the two timestamps or ?

Here is the API explanation

getRequestCount

int getRequestCount(int systemId,
java.sql.Timestamp startTime,
java.sql.Timestamp endTime)

Gets the current total request count.

Parameters:
systemId - the system id.
startTime - the start time.
endTime - the end time.
Returns:
an iterator for the sessions.
dfu
Teradata Employee

Re: Newbie Portlet Deployment Questions

That is a typo in the documentation. The return value is "int", which is the request count for that period of time for that system.
Enthusiast

Re: Newbie Portlet Deployment Questions

I am trying to develop a table widget that when you select a row from the table it will call a function in my view controller. I am using the tablewidget example from the widgetopia portlet but I dont know who to inisialize the urls for the drill down.

TableWidget result = new TableWidget();

// Define the columns
TableColumn[] columns = {
new TableColumn("color", null, null, ColumnType.STRING),
new TableColumn("shape", null, null, ColumnType.STRING) };
result.setColumns(columns);

// Define the data
Object[][] data = { { "red", "square" }, { "blue", "rectangle" },
{ "green", "oval"} };
result.setData(data);

// Define the drill-down URL for each row
// How do I tell the Table Widget to use these?
String[] urls = { "/TopWorstQueriesPortlet/dataserver/executeQuery",
"/TopWorstQueriesPortlet/dataserver/executeQuery",
"/TopWorstQueriesPortlet/dataserver/executeQuery" };

return result;
Enthusiast

Re: Newbie Portlet Deployment Questions

When I deploy my portlets onto the production machine they are all put under the sample tab in the portlets menu. Is there a way to have it deploy under a different tab.
Teradata Employee

Re: Newbie Portlet Deployment Questions

You can change the "category" setting in the viewpoint-portlet.xml file. The PDK documentation has more detailed information about this file: http://developer.teradata.com/viewpoint/reference/viewpoint-portlet-security/xml-configuration