public static String getPath(WebObjectSource objectSource, String objectId, int type)
{
String path = "";
WebFolder folder1 = null;
try
{
folder1 = (WebFolder) objectSource.getObject(objectId, EnumDSSXMLObjectTypes.DssXmlTypeFolder);
folder1.populate();
String p = "";
SimpleList list = folder1.getAncestors();
for (int j = 0; j < folder1.getAncestors().size(); j++)
{
p = ((WebObjectInfo) list.item(j)).getName();
if (!p.equals(MstrObjectList.projectName))
{
path = path + "/" + p;
}
}
}
catch (Exception ex)
{
Logger.log.error("Error while fetching the path of folder: " + ex.getMessage());
}
return path;
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment