/** * Return the localized value for the specified IInstallableUnit * property using the default locale. * * @param iu the IInstallableUnit in question * @param propertyKey the name of the property to be retrieved * @return the localized property value, or <code>null</code> if no * such property is defined. */ public String getIUProperty(IInstallableUnit iu, String propertyKey) { return getIUProperty(iu, propertyKey, null); }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; }
@Override public synchronized Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } return null; } }
public String getProperty(String key, String locale) { return TranslationSupport.getInstance().getIUProperty(this, key, locale); }
public Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName) && key instanceof String) return getInstallableUnitProperty(iu, (String) key); if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { synchronized (this) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } } return null; }
@Override public Object getManagedProperty(Object client, String memberName, Object key) { if (!(client instanceof IInstallableUnit)) return null; IInstallableUnit iu = (IInstallableUnit) client; if (InstallableUnit.MEMBER_PROFILE_PROPERTIES.equals(memberName) && key instanceof String) return getInstallableUnitProperty(iu, (String) key); if (InstallableUnit.MEMBER_TRANSLATED_PROPERTIES.equals(memberName)) { synchronized (this) { if (translationSupport == null) translationSupport = new TranslationSupport(this); return key instanceof KeyWithLocale ? translationSupport.getIUProperty(iu, (KeyWithLocale) key) : translationSupport.getIUProperty(iu, key.toString()); } } return null; }
/** * Return the localized value for the specified IInstallableUnit * property using the locale specified in the <code>propertyKey</code>. * * @param iu the IInstallableUnit in question * @param propertyKey the name and locale of the property to be retrieved * @return the localized property value, or <code>null</code> if no * such property is defined. */ public String getIUProperty(IInstallableUnit iu, KeyWithLocale propertyKey) { return getIUProperty(iu, propertyKey.getKey(), propertyKey.getLocale().toString()); }
} else if (element instanceof IInstallableUnit) { IInstallableUnit iu = (IInstallableUnit) element; String name = fTranslations.getIUProperty(iu, IInstallableUnit.PROP_NAME); if (name == null) { name = iu.getId();