oracle.portal.provider.v1
Class PortletReference

java.lang.Object
  |
  +--oracle.portal.provider.v1.PortletReference

public class PortletReference
extends java.lang.Object

A particular portlet instance is uniquely identified by four values: providerId + portletId + portletInstanceName + portletUserCustomization. A PortletIdentifer encapsulates this information. Of these four values only the portletUserCustomization is allowed to be null. When null it signifies the default (system) portlet instance.


Constructor Summary
PortletReference(Provider provider, Portlet portlet, java.lang.String name, ProviderUser user, java.util.Locale l, java.util.Locale defLocale, boolean translate)
          Constructor
 
Method Summary
 java.util.Locale getDefaultLocale()
           
 java.util.Locale getLocale()
           
 java.lang.String getName()
           
 Portlet getPortlet()
           
 long getPortletId()
           
 Provider getProvider()
           
 long getProviderId()
           
 ProviderUser getUserCustomization()
           
 boolean isDefault()
           
 boolean isLanguageDefault()
           
 java.lang.String toString()
           
 boolean translateDefaultCustomizations()
          The Portal supports an edit mode that allows a page developer to create multiple language versions of a page including the default customizations.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PortletReference

public PortletReference(Provider provider,
                        Portlet portlet,
                        java.lang.String name,
                        ProviderUser user,
                        java.util.Locale l,
                        java.util.Locale defLocale,
                        boolean translate)
Constructor
Parameters:
provider - Provider of this instance
portlet - Portlet of this instance
name - portal generated name of this instance
user - specific user customization reference of this instance. If null it signifies the default (system) instance.
l - the current language/locale setting of this request/user.
defLocale - the default language/locale setting of the portal
translate - whether or not we are in translate mode.
Method Detail

getProvider

public Provider getProvider()
Returns:
the Provider identified by this reference.

getProviderId

public long getProviderId()
Returns:
the Provider ID of the Provider identified by this reference. This is a convenience method for calling getProvider().getProviderId();

getPortlet

public Portlet getPortlet()
Returns:
the Portlet identified by this reference.

getPortletId

public long getPortletId()
Returns:
the Portlet ID of the Portlet identified by this reference. This is a convenience method for calling getPortlet().getId();

getName

public java.lang.String getName()
Returns:
the Portlet instance name of this reference.

getUserCustomization

public ProviderUser getUserCustomization()
Returns:
the user whose customization is requested with this instance. If null then this reference indicates the default (system) instance.

getLocale

public java.util.Locale getLocale()
Returns:
the Locale that should be used on behalf of this reference.

getDefaultLocale

public java.util.Locale getDefaultLocale()
Returns:
the default Locale that should be used on behalf of this reference. This is generally the Portal's default locale. However if not set/passed by the portal then its the Portlet default locale (see Portlet.getDefaultLocale())

translateDefaultCustomizations

public boolean translateDefaultCustomizations()
The Portal supports an edit mode that allows a page developer to create multiple language versions of a page including the default customizations. The boolean return value from this call indicates whether or not the Portlet is in this mode. If false the Portlet should save all edit_default customizations in the default (language) customization. If true the Portlet should save all edit_default customizations in the current language customization.
Returns:
false if not in translate mode.

isDefault

public boolean isDefault()
Returns:
true if this instance identifies a default portlet instance vs. a user (customized) portlet instance. Will be false if getUserCustomization() would return null.

isLanguageDefault

public boolean isLanguageDefault()
Returns:
true if this instance identifies a default portlet instance of a particular language (that isn't the default language) vs. a default portlet reference (to the default language) or a user (customized) portlet instance. I.e. returns true if isDefault() is true and this references Locale isn't equal to the default locale.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
a String representation of this reference. In the form of ProviderId.PortletId.PortletInstanceName.UserName. If this is a reference to the default (system) instance then the .Username is ommitted.