D2 configuration vs. a_is_hidden

Recently we came across a requirement that involved showing the a_is_hidden attribute in the content widget, regardless of its value.

At first glance, it seemed an easy goal to achieve, just add the attribute to the column list and it will work. Well, it doesn’t. The content widget just displays objects with a_is_hidden=false (duh!).

Next step, would be to find the configuration that manages this behaviour. Well, after looking a bit, we found the “configuration” that handles this:

com.emc.d2fs.dctm.content.FolderContent generates a DQL in order to retrieve the contents of the folder, and the method that generates this query uses com.emc.d2.api.preferences.ID2cPreferences to retrieve different preferences related to queries.

Some decompiling get us to the configurable side of things:

com.emc.d2.api.preferences.D2cPreferences:

 public DqlFilter getDqlFilter()
{
DqlFilter result = new DqlFilter(false, false);
return result;
}

com.emc.d2.api.preferences.DqlFilter:

public final class DqlFilter
{
private boolean m_showHidden;
private boolean m_showArchive;

public DqlFilter(boolean showHidden, boolean showArchive)
{
this.m_showHidden = showHidden;
this.m_showArchive = showArchive;
}

public String toString()
{
StringBuffer result = new StringBuffer();
if (!this.m_showHidden) {
result.append("a_is_hidden = false");
}
if (!this.m_showArchive)
{
if (result.length() != 0) {
result.append(" and ");
}
result.append("a_archive = false");
}
return result.toString();
}
}

So much for configurable application…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.