Monday, August 20, 2007

Google Analytics with Blogger

Google Analytics is an awesome FREE website usage/ analysis tool. Since I started blogging, I have had the eerie feeling that I am writing and no-one is reading. (I guess by the fact that there are no comments on my blog entries.) I figured, what the heck, I think I will try to confirm this suspicion.

Since I have used google analytics to track usage statistics from other sites I have worked on, I thought I would check to see if it would be possible to do with my blog.

And sure enough I can! And, as a bonus it is also quite easy.

Just head over to google analytics and add a profile for your blog. If you don't already have an account you can use your existing gmail account or create a new one.

The wizard will then present you with a little snippet of javascript.

Copy this snippet to your clipboard.

Edit your blog layout. (On the dashboard, click on "Layout" next to the blog you want to track)

On the layout click on "Add a page element"

Find the "HTML/JavaScript" page element and click the "ADD TO BLOG" button.

Leave the title blank.

Paste the copied bit of javascript into "Content" section.

Click on Save Changes.

Bingo!

-sean

Thursday, August 16, 2007

Using Maven1(maven) and Maven2(mvn) at the same time

I am working on a project where I need to use maven and mvn at the same time. I got tired of switching my maven_home variable, so I came up with a solution that allows me to switch transparently.

Note: This is tested on OSX, and will likely work on any linux or unix OS. Not sure if it will work under cygwin or not. its a definite maybe.

1. remove references to maven from your path variable.
2. in your .profile create env variables for both maven and mvn home directories. Mine are called M1_HOME and M2_HOME.
3. edit your .bashprofile or and create functions like so:
function maven
{
export MAVEN_HOME=$M1_HOME
$MAVEN_HOME/bin/maven $@
}

function mvn
{
export MAVEN_HOME=$M2_HOME
$MAVEN_HOME/bin/mvn $@
}


Thats it!

-sean

Oracle UltraSearch

Well I have been reading up on Oracle UltraSearch (which I believe has either been superseded or replaced by Oracle Secure Enterprise Search). I am working on a search solution for a client which requires the integration of multiple repositories into a single search and I believe this is this the ticket.

The goal is to integrate the search of their Portal deployment, Content Services content, and in the future some 3rd party websites.

Awesome! Ultrasearch for Collab Suite does this out of the box, right?

Nope. Well it does, but it will only index public content in Portal, and we want to be able to do search with ACLs. Furthermore, there is additional metadata associated with the documents that we need to capture. Also, as far as content services goes, the ultra search integration is touted as being implemented using the Federated search aspect of ultra search. Basically this means that Content Services is searched in real time and not indexed by ultra search. (On a hunch, I consider this to be slower).

Expect to see how-tos on Ultra-search coming in the future.

-sean

Wednesday, August 15, 2007

Oracle Portal content report

Seems like a big hole in the portal product is a way to determine a catalog of what you have as far as pages go. Also a major problem is knowing what pages are using what template and what pages are using which pageskin.

This makes it difficult to determine what you might break when modifying a template or modifying a pageskin.

After much pain an suffering while digging through the portal schema I came up with a query that gives me a pretty good report which has this information.

Since I am not an employee of Oracle I am not privy to documentation on the schema so my interpretation of the columns are just my best guess.


--Get the pages with no template or page skin
select distinct
'Page' as object_type,
pageSite.name as page_group,
page.name as name,
portal.wwpob_page_util.get_page_url(page.id,page.siteid) as url,
null as template_name,
null as template_tab,
null as pageskin_name
from portal.wwpob_page$ page,
portal.wwsbr_sites$ pageSite
where page.template_id is null
and page.ui_template_id is null
and page.siteid = pageSite.id
and page.is_template=0
--Get the pages with a template (template_id not null)
union
select distinct
'Page' as object_type,
pageSite.name as page_group,
page.name as name,
portal.wwpob_page_util.get_page_url(page.id,page.siteid) as url,
template.page_group || ' - ' || template.template_name as template_name,
template.tab_name as template_tab,
null as pageskin_name
from portal.wwpob_page$ page,
portal.wwsbr_sites$ pageSite,
( select distinct
template.id as id,
templateSite.name as page_group,
decode(parentTemplate.name, null, template.name, parentTemplate.name) as template_name,
decode(parentTemplate.name, null, null, template.name) as tab_name
from portal.wwpob_page$ template
left outer join portal.wwpob_page$ parentTemplate
on template.parentid = parentTemplate.id,
portal.wwsbr_sites$ templateSite
where template.is_template = 1
and template.siteid = templateSite.id
) template
where page.is_template=0
and page.template_id = template.id
and page.siteid = pageSite.id
--Get the pages and templates with a skin (template == null skin != null)
union
select distinct
decode(page.is_template,0,'Page',1,'Template') as object_type,
pageSite.name as page_group,
page.name as name,
portal.wwpob_page_util.get_page_url(page.id,page.siteid) as url,
null as template_name,
null as template_tab,
pageskinSite.name || ' - ' || pageskin.template_name as pageskin_name
from portal.wwpob_page$ page,
portal.wwsbr_sites$ pageSite,
portal.wwtmp_usr_template$ pageskin,
portal.wwsbr_sites$ pageskinSite
where page.template_id is null
and page.ui_template_id = pageskin.id
and page.siteid = pageSite.id
and pageskin.site_id = pageskinSite.id

Hard to find Oracle Portal developers

I work for a consulting company called Sagelogix. We have been getting busier and busier, and as we look for resources to assist on new projects we are finding it very difficult to find Oracle Portal developers in the Denver area.

If anyone out there knows Oracle Portal, or has administered Oracle Application Server with Single Signon let me know.

Inagural Post

Well this is my first blog ever.

My goal is to update my blog with the technical issues I face at work and how I solved them. Hopefully people with either benefit from my lessons learned, or offer me better solutions than I arrived at.

Here's to blogging!