Custom Icons - javac compiler errors

Hello. I'm hoping someone can help me. I'm using Luminis IV and keep getting errors when compiling the MultipleIconEvaluator.java file using the javac utility.

------------------------------
Here are the errors I recieve:
------------------------------

MultipleIconEvaluator.java:4: package org.apache.commons.logging does not exist
import org.apache.commons.logging.Log;
^
MultipleIconEvaluator.java:5: package org.apache.commons.logging does not exist
import org.apache.commons.logging.LogFactory;
^
MultipleIconEvaluator.java:7: package org.jasig.portal.channels.cpicons does not exist
import org.jasig.portal.channels.cpicons.IconEvaluator;
^
MultipleIconEvaluator.java:8: package campuspipeline.uportal.dlm.provider does not exist
import campuspipeline.uportal.dlm.provider.ExtensionClass;
^
MultipleIconEvaluator.java:10: cannot find symbol
symbol: class IconEvaluator
public class MultipleIconEvaluator extends IconEvaluator
^
MultipleIconEvaluator.java:15: cannot find symbol
symbol : class Log
location: class com.sungardhe.cpicons.MultipleIconEvaluator
private static final Log cLog = LogFactory.getLog(
^
MultipleIconEvaluator.java:15: cannot find symbol
symbol : variable LogFactory
location: class com.sungardhe.cpicons.MultipleIconEvaluator
private static final Log cLog = LogFactory.getLog(
^
MultipleIconEvaluator.java:24: cannot find symbol
symbol : variable super
location: class com.sungardhe.cpicons.MultipleIconEvaluator
Map icons = super.evaluate( cpInfo );
^
MultipleIconEvaluator.java:30: cannot find symbol
symbol : method getDirectoryProperty(org.w3c.dom.Element,java.lang.String)
location: class com.sungardhe.cpicons.MultipleIconEvaluator
if ( getDirectoryProperty(cpInfo,"webct.enabled").equalsIgnoreCase("true") )
^
MultipleIconEvaluator.java:41: cannot find symbol
symbol : method getDirectoryProperty(org.w3c.dom.Element,java.lang.String)
location: class com.sungardhe.cpicons.MultipleIconEvaluator
if ( getDirectoryProperty(cpInfo,"outlook.enabled").equalsIgnoreCase("true") )
^
MultipleIconEvaluator.java:45: cannot find symbol
symbol : method getLDAPAttributes(org.w3c.dom.Element,java.lang.String)
location: class com.sungardhe.cpicons.MultipleIconEvaluator
String[] userRoles = (String[])getLDAPAttributes(cpInfo,"pdsRole").toArray(new String[0]);
^
Note: MultipleIconEvaluator.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errors

--------------------------------------
Here is the code I'm trying to compile:
--------------------------------------

package com.sungardhe.cpicons;

import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.w3c.dom.Element;
import org.jasig.portal.channels.cpicons.IconEvaluator;
import campuspipeline.uportal.dlm.provider.ExtensionClass;

public class MultipleIconEvaluator extends IconEvaluator
{
public static final String RCS_ID = "@(#) $Header: //depot/main/luminis-sdk/ui-sdk/samples/com/sungardhe/cpicons/MultipleIconEvaluator.java#1 $";

/** Class logging object. */
private static final Log cLog = LogFactory.getLog(
MultipleIconEvaluator.class
);

private static final String WEBCT_ICON = "webct";
private static final String OUTLOOK_ICON = "outlook";

public Map evaluate( Element cpInfo )
{
Map icons = super.evaluate( cpInfo );
boolean webctEnabled = false;

try
{
// Test to see if webct.enabled is set to true
if ( getDirectoryProperty(cpInfo,"webct.enabled").equalsIgnoreCase("true") )
{
webctEnabled = true;
}
// Update the icon map
icons.put(WEBCT_ICON, "" + webctEnabled );

// Override MCInfonet icon display to only display for
//employees or faculty. First, check to see if the
//property is enabled
boolean outlookEnabled = false;
if ( getDirectoryProperty(cpInfo,"outlook.enabled").equalsIgnoreCase("true") )
{
// Now check to see if this user is an employee or
//faculty member
String[] userRoles = (String[])getLDAPAttributes(cpInfo,"pdsRole").toArray(new String[0]);

for (int i = 0; i < userRoles.length; i++)
{

if (userRoles[i].equalsIgnoreCase("employee"))
{
outlookEnabled = true;
break;
}
}
}
// Update the icon map with information for the
// outlook icon
icons.put(OUTLOOK_ICON, "" + outlookEnabled );
}
catch( Exception ex )
{
cLog.error( "failed to evaluate system property", ex );
}

return icons;

}

}

--------------------------

Any ideas? Many thanks for any insights.

-Dan

0
No votes yet

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

sounds like your classpath

sounds like your classpath is incorrect

I'm running the command

I'm running the command "$CP_ROOT/bin/cpclasspath" before trying to compile. Any ideas on what I can do to correct the classpath issue?

Thanks!

I was having the same

I was having the same problem so I thought I'd post my mistake here for anyone else coming across this.

I did not execute the cpclasspath with a preceeding "."

I needed to run:
. cpclasspath