Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

oracle.apps.fnd.applcore.socialnetwork.model.osn.visitor
Class OsnTranslationVisitor

java.lang.Object
  extended by oracle.apps.fnd.applcore.socialnetwork.model.osn.visitor.OsnTranslationVisitor
All Implemented Interfaces:
OsnBaseAdaptor, OsnTranslationAdaptor, ViewObjectStructureVisitor
Direct Known Subclasses:
OsnVisitor

public class OsnTranslationVisitor
extends java.lang.Object
implements OsnTranslationAdaptor, ViewObjectStructureVisitor

The visitor that will be used to extract the translatable OSN data from a ViewObjectStructure object.

Since:
11.1.1.7.0
Version:
$Header: atgpf/applcore/applications/SocialNetwork/Model/src/oracle/apps/fnd/applcore/socialnetwork/model/osn/visitor/OsnTranslationVisitor.java /st_atgpf_pt-11.1.1.7.0/3 2013/01/15 17:30:29 pacross Exp $

Field Summary
protected  java.util.ArrayList<oracle.jbo.JboException> _errors
           
protected  java.util.ArrayList<oracle.jbo.JboException> _warnings
           
static java.lang.String ALL_COUNTRY
           
static java.lang.String ALL_LANG
           
 
Constructor Summary
OsnTranslationVisitor()
          Default Constructor.
 
Method Summary
 void addLocales(oracle.jbo.LocaleContext[] locales)
          Provide a list of locales that will be used to retrieve the languages for.
protected  void addTranslation(oracle.jbo.LocaleContext locale, java.lang.String name, java.lang.String text)
          Add a name-translated text combination to the Social Network Locale.
protected  java.lang.Object defaultValue(java.lang.Object value, java.lang.Object defaultValue, java.lang.String name, java.lang.String defaultName, java.lang.String objectName)
          Checks to see if the value exists and if it doesn't then the default value will be used.
 java.lang.String getAppId()
          Get the application id for the OSN structure registration of an object.
 java.lang.String getDescription()
          Get the base language description for the OSN structure registration of an object.
 java.lang.String getDisplayType()
          Get the base language name of the type for the OSN structure registration of an object.
 java.lang.String getDisplayTypePlural()
          Get the base language plural name of the type for the OSN structure registration of an object.
 java.lang.String getExternalId()
          Gets the constant value that will be used for identification of the OSN structure registration of an object.
 java.lang.String getOsnName()
          Gets the constant value that will be used for naming of the OSN structure registration of an object.
 java.util.List<waggle.common.modules.social.v1.infos.socialdefinitions.XV1SocialDefinitionLocaleInfo> getTranslations()
          Provide a list of locale information to be sent to OSN.
 java.lang.String getType()
          Get the constant value of the type for the OSN structure registration of an object.
 java.lang.String getTypePlural()
          Get the constant plural value of the type for the OSN structure registration of an object.
 java.util.ArrayList<oracle.jbo.JboException> getValidationErrors()
          Provide the list of errors in validation that have occured whilst visiting the last object.
 java.lang.String getVisitorName()
          Name of the visitor.
 void reset()
          
protected  void validateExistance(java.lang.Object value, java.lang.String name, java.lang.String objectName, boolean isError)
          Validates that the value passed in exists and writes a message to the log and errors/warnings collection if value does not exist.
protected  void validateExternalId(java.lang.String externalId, boolean isError)
          Validates that the external id passed in meets the standard for OSN external identifiers and writes a message to the log and errors/warnings collection if value does not exist.
 void visit(ViewObjectNodeStructure node)
          Visit the node and process its contents.
protected  void visitAttributeTranslations(SocialNetworkNodeAttribute attribute)
          Extract the translation information from the attribute.
protected  void visitNodeTranslations(ViewObjectNodeStructure node)
          Extract the translated information for the node without interrogating the attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALL_LANG

public static final java.lang.String ALL_LANG
See Also:
Constant Field Values

ALL_COUNTRY

public static final java.lang.String ALL_COUNTRY
See Also:
Constant Field Values

_errors

protected java.util.ArrayList<oracle.jbo.JboException> _errors

_warnings

protected java.util.ArrayList<oracle.jbo.JboException> _warnings
Constructor Detail

OsnTranslationVisitor

public OsnTranslationVisitor()
Default Constructor.

Method Detail

reset

public void reset()


getValidationErrors

public java.util.ArrayList<oracle.jbo.JboException> getValidationErrors()
Provide the list of errors in validation that have occured whilst visiting the last object.


addLocales

public void addLocales(oracle.jbo.LocaleContext[] locales)
Provide a list of locales that will be used to retrieve the languages for.

Specified by:
addLocales in interface OsnTranslationAdaptor
Parameters:
locales - the locales.

getAppId

public java.lang.String getAppId()
Get the application id for the OSN structure registration of an object.

Specified by:
getAppId in interface OsnBaseAdaptor
Returns:
the application id.

getType

public java.lang.String getType()
Get the constant value of the type for the OSN structure registration of an object.

Specified by:
getType in interface OsnBaseAdaptor
Returns:
the constant type definition.

getTypePlural

public java.lang.String getTypePlural()
Get the constant plural value of the type for the OSN structure registration of an object.

Specified by:
getTypePlural in interface OsnBaseAdaptor
Returns:
the constant plural type definition.

getExternalId

public java.lang.String getExternalId()
Gets the constant value that will be used for identification of the OSN structure registration of an object.

Specified by:
getExternalId in interface OsnBaseAdaptor
Returns:
the constant external id.

getOsnName

public java.lang.String getOsnName()
Gets the constant value that will be used for naming of the OSN structure registration of an object.

Specified by:
getOsnName in interface OsnBaseAdaptor
Returns:
the constant OSN object definition name.

getDisplayType

public java.lang.String getDisplayType()
Get the base language name of the type for the OSN structure registration of an object.

Specified by:
getDisplayType in interface OsnTranslationAdaptor
Returns:
the base language name of the type.

getDisplayTypePlural

public java.lang.String getDisplayTypePlural()
Get the base language plural name of the type for the OSN structure registration of an object.

Specified by:
getDisplayTypePlural in interface OsnTranslationAdaptor
Returns:
the base language plural name of the type.

getDescription

public java.lang.String getDescription()
Get the base language description for the OSN structure registration of an object.

Specified by:
getDescription in interface OsnTranslationAdaptor
Returns:
the base language description.

getVisitorName

public java.lang.String getVisitorName()
Name of the visitor.

Specified by:
getVisitorName in interface ViewObjectStructureVisitor
Returns:
visitor name.

getTranslations

public java.util.List<waggle.common.modules.social.v1.infos.socialdefinitions.XV1SocialDefinitionLocaleInfo> getTranslations()
Provide a list of locale information to be sent to OSN.

Specified by:
getTranslations in interface OsnTranslationAdaptor
Returns:
tranlsation locale information.

addTranslation

protected void addTranslation(oracle.jbo.LocaleContext locale,
                              java.lang.String name,
                              java.lang.String text)
Add a name-translated text combination to the Social Network Locale.

Parameters:
locale - the locale to add the text to.
name - the name/key that the text will be retrieved by in OSN.
text - the translated text.

visitAttributeTranslations

protected void visitAttributeTranslations(SocialNetworkNodeAttribute attribute)
Extract the translation information from the attribute.

Parameters:
attribute - a SocialNetworkNode attribute.

visitNodeTranslations

protected void visitNodeTranslations(ViewObjectNodeStructure node)
Extract the translated information for the node without interrogating the attributes.

Parameters:
node - the node to visit.

visit

public void visit(ViewObjectNodeStructure node)
Visit the node and process its contents.

Specified by:
visit in interface ViewObjectStructureVisitor
Parameters:
node - the node to visit.

validateExistance

protected void validateExistance(java.lang.Object value,
                                 java.lang.String name,
                                 java.lang.String objectName,
                                 boolean isError)
Validates that the value passed in exists and writes a message to the log and errors/warnings collection if value does not exist.

Parameters:
value - the value to test.
name - the display name representing the value.
objectName - the name of the object which contains the value (for example: View Object name).
isError - write to error collection if true otherwise warnings collection.

validateExternalId

protected void validateExternalId(java.lang.String externalId,
                                  boolean isError)
Validates that the external id passed in meets the standard for OSN external identifiers and writes a message to the log and errors/warnings collection if value does not exist.

Parameters:
externalId - the value to test.
isError - write to error collection if true otherwise warnings collection.

defaultValue

protected java.lang.Object defaultValue(java.lang.Object value,
                                        java.lang.Object defaultValue,
                                        java.lang.String name,
                                        java.lang.String defaultName,
                                        java.lang.String objectName)
Checks to see if the value exists and if it doesn't then the default value will be used. A log message and the warning collection will also be written to.

Parameters:
value - the value to test.
name - the display name representing the value.
objectName - the name of the object which contains the value (for example: View Object name).
Returns:
the value passed in or default value if value was null.

Oracle Fusion Middleware extensions for Applications Core API Reference
11g Release 7 (11.1.7)

E22562-07

Copyright © 2013 Oracle. All Rights Reserved.