idx int64 0 41.2k | question stringlengths 74 4.04k | target stringlengths 7 750 |
|---|---|---|
30,800 | static TemplateAliases createTemplateAliases ( SoyFileNode fileNode ) { Map < String , String > aliasMap = new HashMap < > ( ) ; Set < String > localTemplates = new HashSet < > ( ) ; int counter = 0 ; ImmutableList . Builder < TemplateNode > templates = ImmutableList . builder ( ) ; templates . addAll ( SoyTreeUtils . getAllNodesOfType ( fileNode , TemplateBasicNode . class ) ) . addAll ( SoyTreeUtils . getAllNodesOfType ( fileNode , TemplateElementNode . class ) ) ; for ( TemplateNode templateNode : templates . build ( ) ) { String partialName = templateNode . getPartialTemplateName ( ) ; String fullyQualifiedName = templateNode . getTemplateName ( ) ; localTemplates . add ( fullyQualifiedName ) ; Preconditions . checkState ( partialName != null , "Aliasing not supported for V1 templates" ) ; String alias = "$" + partialName . substring ( 1 ) ; aliasMap . put ( fullyQualifiedName , alias ) ; } for ( CallBasicNode callBasicNode : SoyTreeUtils . getAllNodesOfType ( fileNode , CallBasicNode . class ) ) { String fullyQualifiedName = callBasicNode . getCalleeName ( ) ; if ( localTemplates . contains ( fullyQualifiedName ) || aliasMap . containsKey ( fullyQualifiedName ) ) { continue ; } String alias = TEMPLATE_ALIAS_PREFIX + ( ++ counter ) ; aliasMap . put ( fullyQualifiedName , alias ) ; } return new Aliases ( aliasMap ) ; } | Creates a mapping for assigning and looking up the variable alias for templates both within a file and referenced from external files . For local files the alias is just the local template s name . For external templates the alias is an identifier that is unique for that template . |
30,801 | void generateTableEntries ( CodeBuilder ga ) { for ( Variable var : allVariables ) { try { var . local . tableEntry ( ga ) ; } catch ( Throwable t ) { throw new RuntimeException ( "unable to write table entry for: " + var . local , t ) ; } } } | Write a local variable table entry for every registered variable . |
30,802 | void defineFields ( ClassVisitor writer ) { for ( Variable var : allVariables ) { var . maybeDefineField ( writer ) ; } if ( currentCalleeField != null ) { currentCalleeField . defineField ( writer ) ; } if ( currentRendereeField != null ) { currentRendereeField . defineField ( writer ) ; } if ( currentAppendable != null ) { currentAppendable . defineField ( writer ) ; } } | Defines all the fields necessary for the registered variables . |
30,803 | FieldRef getCurrentCalleeField ( ) { FieldRef local = currentCalleeField ; if ( local == null ) { local = currentCalleeField = FieldRef . createField ( owner , CURRENT_CALLEE_FIELD , CompiledTemplate . class ) ; } return local ; } | Returns the field that holds the current callee template . |
30,804 | FieldRef getCurrentRenderee ( ) { FieldRef local = currentRendereeField ; if ( local == null ) { local = currentRendereeField = FieldRef . createField ( owner , CURRENT_RENDEREE_FIELD , SoyValueProvider . class ) ; } return local ; } | Returns the field that holds the currently rendering SoyValueProvider . |
30,805 | FieldRef getCurrentAppendable ( ) { FieldRef local = currentAppendable ; if ( local == null ) { local = currentAppendable = FieldRef . createField ( owner , CURRENT_APPENDABLE_FIELD , LoggingAdvisingAppendable . class ) ; } return local ; } | Returns the field that holds the currently rendering LoggingAdvisingAppendable object that is used for streaming renders . |
30,806 | Variable getVariable ( String name ) { VarKey varKey = VarKey . create ( Kind . USER_DEFINED , name ) ; return getVariable ( varKey ) ; } | Looks up a user defined variable with the given name . The variable must have been created in a currently active scope . |
30,807 | Variable getVariable ( SyntheticVarName name ) { VarKey varKey = VarKey . create ( Kind . SYNTHETIC , name . name ( ) ) ; return getVariable ( varKey ) ; } | Looks up a synthetic variable with the given name . The variable must have been created in a currently active scope . |
30,808 | public SanitizedContent knownDirAttrSanitized ( Dir dir ) { Preconditions . checkNotNull ( dir ) ; if ( dir != contextDir ) { switch ( dir ) { case LTR : return LTR_DIR ; case RTL : return RTL_DIR ; case NEUTRAL : } } return NEUTRAL_DIR ; } | Returns dir = \ ltr \ or dir = \ rtl \ depending on the given directionality if it is not NEUTRAL or the same as the context directionality . Otherwise returns . |
30,809 | static Dir estimateDirection ( String str , boolean isHtml ) { return BidiUtils . estimateDirection ( str , isHtml ) ; } | Estimates the directionality of a string using the best known general - purpose method i . e . using relative word counts . Dir . NEUTRAL return value indicates completely neutral input . |
30,810 | public static ValidatedConformanceConfig create ( ConformanceConfig config ) { ImmutableList . Builder < RuleWithWhitelists > rulesBuilder = new ImmutableList . Builder < > ( ) ; for ( Requirement requirement : config . getRequirementList ( ) ) { Preconditions . checkArgument ( ! requirement . getErrorMessage ( ) . isEmpty ( ) , "requirement missing error message" ) ; Preconditions . checkArgument ( requirement . getRequirementTypeCase ( ) != RequirementTypeCase . REQUIREMENTTYPE_NOT_SET , "requirement missing type" ) ; Rule < ? extends Node > rule = forRequirement ( requirement ) ; ImmutableList < String > whitelists = ImmutableList . copyOf ( requirement . getWhitelistList ( ) ) ; ImmutableList < String > onlyApplyToPaths = ImmutableList . copyOf ( requirement . getOnlyApplyToList ( ) ) ; rulesBuilder . add ( RuleWithWhitelists . create ( rule , whitelists , onlyApplyToPaths ) ) ; } return new ValidatedConformanceConfig ( rulesBuilder . build ( ) ) ; } | Creates a validated configuration object . |
30,811 | private static Rule < ? > createCustomRule ( String javaClass , SoyErrorKind error ) { Class < ? extends Rule < ? > > customRuleClass ; try { @ SuppressWarnings ( "unchecked" ) Class < ? extends Rule < ? > > asSubclass = ( Class < ? extends Rule < ? > > ) Class . forName ( javaClass ) . asSubclass ( Rule . class ) ; customRuleClass = asSubclass ; } catch ( ClassNotFoundException e ) { throw new IllegalArgumentException ( "custom rule class " + javaClass + " not found" , e ) ; } try { Constructor < ? extends Rule < ? > > ctor = customRuleClass . getDeclaredConstructor ( SoyErrorKind . class ) ; return ctor . newInstance ( error ) ; } catch ( ReflectiveOperationException e ) { throw new IllegalArgumentException ( "unable to construct custom rule class: " + javaClass + ": " + e . getMessage ( ) , e ) ; } } | Instantiates a custom conformance check from its fully - qualified class name specified in the conformance protobuf . |
30,812 | public void setUseGoogIsRtlForBidiGlobalDir ( boolean useGoogIsRtlForBidiGlobalDir ) { Preconditions . checkState ( ! useGoogIsRtlForBidiGlobalDir || shouldGenerateGoogMsgDefs , "Do not specify useGoogIsRtlForBidiGlobalDir without shouldGenerateGoogMsgDefs." ) ; Preconditions . checkState ( ! useGoogIsRtlForBidiGlobalDir || bidiGlobalDir == 0 , "Must not specify both bidiGlobalDir and useGoogIsRtlForBidiGlobalDir." ) ; this . useGoogIsRtlForBidiGlobalDir = useGoogIsRtlForBidiGlobalDir ; } | Sets the Javascript code snippet that will evaluate at template runtime to a boolean value indicating whether the bidi global direction is rtl . Can only be used when shouldGenerateGoogMsgDefs is true . |
30,813 | protected PyExpr visitPrimitiveNode ( PrimitiveNode node ) { return new PyExpr ( node . toSourceString ( ) , Integer . MAX_VALUE ) ; } | Implementations for primitives . |
30,814 | private PyExpr genPyExprUsingSoySyntax ( OperatorNode opNode ) { List < PyExpr > operandPyExprs = visitChildren ( opNode ) ; String newExpr = PyExprUtils . genExprWithNewToken ( opNode . getOperator ( ) , operandPyExprs , null ) ; return new PyExpr ( newExpr , PyExprUtils . pyPrecedenceForOperator ( opNode . getOperator ( ) ) ) ; } | Generates a Python expression for the given OperatorNode s subtree assuming that the Python expression for the operator uses the same syntax format as the Soy operator . |
30,815 | public static void ensureDirsExistInPath ( String path ) { if ( path == null || path . length ( ) == 0 ) { throw new AssertionError ( "ensureDirsExistInPath called with null or empty path." ) ; } String dirPath = ( path . charAt ( path . length ( ) - 1 ) == File . separatorChar ) ? path . substring ( 0 , path . length ( ) - 1 ) : ( new File ( path ) ) . getParent ( ) ; if ( dirPath == null || knownExistingDirs . contains ( dirPath ) ) { return ; } else { ( new File ( dirPath ) ) . mkdirs ( ) ; knownExistingDirs . add ( dirPath ) ; } } | Ensures that the directories in the given path exist creating them if necessary . |
30,816 | public static String extractPartAfterLastDot ( String dottedIdent ) { int lastDotIndex = dottedIdent . lastIndexOf ( '.' ) ; return ( lastDotIndex == - 1 ) ? dottedIdent : dottedIdent . substring ( lastDotIndex + 1 ) ; } | Gets the part after the last dot in a dotted identifier . If there are no dots returns the whole input string . |
30,817 | public final SoyTypeP toProto ( ) { SoyTypeP local = protoDual ; if ( local == null ) { SoyTypeP . Builder builder = SoyTypeP . newBuilder ( ) ; doToProto ( builder ) ; local = builder . build ( ) ; protoDual = local ; } return local ; } | The type represented in proto format . For template metadata protos . |
30,818 | public SourceLocation substringLocation ( int start , int end ) { checkElementIndex ( start , rawText . length ( ) , "start" ) ; checkArgument ( start < end ) ; checkArgument ( end <= rawText . length ( ) ) ; if ( offsets == null ) { return getSourceLocation ( ) ; } return new SourceLocation ( getSourceLocation ( ) . getFilePath ( ) , offsets . getPoint ( rawText , start ) , offsets . getPoint ( rawText , end - 1 ) ) ; } | Returns the source location of the given substring . |
30,819 | public void rewrite ( ImmutableList < SoyFileNode > sourceFiles , IdGenerator idGenerator , TemplateRegistry registry ) { Inferences inferences = new Inferences ( registry ) ; for ( SoyFileNode file : sourceFiles ) { for ( TemplateNode templateNode : file . getChildren ( ) ) { try { Context startContext = Context . getStartContextForContentKind ( MoreObjects . firstNonNull ( templateNode . getContentKind ( ) , SanitizedContentKind . HTML ) ) ; InferenceEngine . inferTemplateEndContext ( templateNode , startContext , inferences , errorReporter ) ; } catch ( SoyAutoescapeException e ) { reportError ( errorReporter , e ) ; } } } if ( errorReporter . hasErrors ( ) ) { return ; } Rewriter rewriter = new Rewriter ( inferences , idGenerator , printDirectives ) ; for ( SoyFileNode file : sourceFiles ) { rewriter . rewrite ( file ) ; } } | Rewrites the given Soy files so that dynamic output is properly escaped according to the context in which it appears . |
30,820 | private void reportError ( ErrorReporter errorReporter , SoyAutoescapeException e ) { String message = "- " + e . getOriginalMessage ( ) ; while ( e . getCause ( ) instanceof SoyAutoescapeException ) { e = ( SoyAutoescapeException ) e . getCause ( ) ; message += "\n- " + e . getMessage ( ) ; } errorReporter . report ( e . getSourceLocation ( ) , AUTOESCAPE_ERROR , message ) ; } | Reports an autoescape exception . |
30,821 | public void accumulateActiveEdges ( ImmutableList < ActiveEdge > activeEdges ) { for ( ActiveEdge accEdge : activeEdges ) { accEdge . getGraphNode ( ) . linkEdgeToNode ( accEdge . getActiveEdge ( ) , this ) ; } } | Links the all the given active edges to this node . |
30,822 | static SourceLocation createSrcLoc ( String filePath , Token first , Token ... rest ) { int beginLine = first . beginLine ; int beginColumn = first . beginColumn ; int endLine = first . endLine ; int endColumn = first . endColumn ; for ( Token next : rest ) { checkArgument ( startsLaterThan ( next , beginLine , beginColumn ) ) ; checkArgument ( endsLaterThan ( next , endLine , endColumn ) ) ; endLine = next . endLine ; endColumn = next . endColumn ; } if ( beginLine == 0 && endLine == 0 && beginColumn == 0 && endColumn == 0 ) { return new SourceLocation ( filePath ) ; } return new SourceLocation ( filePath , beginLine , beginColumn , endLine , endColumn ) ; } | Returns a source location for the given tokens . |
30,823 | public ImmutableList < TemplateMetadata > getTemplates ( CallNode node ) { if ( node instanceof CallBasicNode ) { String calleeName = ( ( CallBasicNode ) node ) . getCalleeName ( ) ; TemplateMetadata template = basicTemplatesOrElementsMap . get ( calleeName ) ; return template == null ? ImmutableList . of ( ) : ImmutableList . of ( template ) ; } else { String calleeName = ( ( CallDelegateNode ) node ) . getDelCalleeName ( ) ; return delTemplateSelector . delTemplateNameToValues ( ) . get ( calleeName ) ; } } | Look up possible targets for a call . |
30,824 | public Optional < SanitizedContentKind > getCallContentKind ( CallNode node ) { ImmutableList < TemplateMetadata > templateNodes = getTemplates ( node ) ; if ( ! templateNodes . isEmpty ( ) ) { return Optional . fromNullable ( templateNodes . get ( 0 ) . getContentKind ( ) ) ; } return Optional . absent ( ) ; } | Gets the content kind that a call results in . If used with delegate calls the delegate templates must use strict autoescaping . This relies on the fact that all delegate calls must have the same kind when using strict autoescaping . This is enforced by CheckDelegatesPass . |
30,825 | public static TemplateMetadata fromTemplate ( TemplateNode template ) { TemplateMetadata . Builder builder = builder ( ) . setTemplateName ( template . getTemplateName ( ) ) . setSourceLocation ( template . getSourceLocation ( ) ) . setSoyFileKind ( SoyFileKind . SRC ) . setContentKind ( template . getContentKind ( ) ) . setStrictHtml ( template . isStrictHtml ( ) ) . setDelPackageName ( template . getDelPackageName ( ) ) . setVisibility ( template . getVisibility ( ) ) . setParameters ( Parameter . directParametersFromTemplate ( template ) ) . setDataAllCallSituations ( DataAllCallSituation . fromTemplate ( template ) ) ; switch ( template . getKind ( ) ) { case TEMPLATE_BASIC_NODE : builder . setTemplateKind ( Kind . BASIC ) ; break ; case TEMPLATE_DELEGATE_NODE : builder . setTemplateKind ( Kind . DELTEMPLATE ) ; TemplateDelegateNode deltemplate = ( TemplateDelegateNode ) template ; builder . setDelTemplateName ( deltemplate . getDelTemplateName ( ) ) ; builder . setDelTemplateVariant ( deltemplate . getDelTemplateVariant ( ) ) ; break ; case TEMPLATE_ELEMENT_NODE : builder . setTemplateKind ( Kind . ELEMENT ) ; break ; default : throw new AssertionError ( "unexpected template kind: " + template . getKind ( ) ) ; } return builder . build ( ) ; } | Builds a Template from a parsed TemplateNode . |
30,826 | protected Expression maybeWrapContent ( CodeChunk . Generator generator , CallParamContentNode node , Expression content ) { SanitizedContentKind kind = node . getContentKind ( ) ; if ( kind == SanitizedContentKind . HTML || kind == SanitizedContentKind . ATTRIBUTES ) { return content ; } return super . maybeWrapContent ( generator , node , content ) ; } | Never wrap contents as SanitizedContent if HTML or ATTRIBUTES . |
30,827 | public CompiledTemplate . Factory getTemplateFactory ( String name ) { CompiledTemplate . Factory factory = getTemplateData ( name ) . factory ; if ( factory == null ) { throw new IllegalArgumentException ( "cannot get a factory for the private template: " + name ) ; } return factory ; } | Returns a factory for the given fully qualified template name . |
30,828 | public ImmutableSortedSet < String > getTransitiveIjParamsForTemplate ( String templateName ) { TemplateData templateData = getTemplateData ( templateName ) ; ImmutableSortedSet < String > transitiveIjParams = templateData . transitiveIjParams ; if ( transitiveIjParams != null ) { return transitiveIjParams ; } Set < TemplateData > all = new HashSet < > ( ) ; collectTransitiveCallees ( templateData , all ) ; ImmutableSortedSet . Builder < String > ijs = ImmutableSortedSet . naturalOrder ( ) ; for ( TemplateData callee : all ) { ijs . addAll ( callee . injectedParams ) ; } transitiveIjParams = ijs . build ( ) ; templateData . transitiveIjParams = transitiveIjParams ; return transitiveIjParams ; } | Returns the transitive closure of all the injected params that might be used by this template . |
30,829 | private String generateOptionalSafeTagsArg ( List < ? extends TargetExpr > args ) { String optionalSafeTagsArg = "" ; if ( ! args . isEmpty ( ) ) { Iterable < String > optionalSafeTagExprs = Iterables . transform ( args , TargetExpr :: getText ) ; for ( String singleQuoted : optionalSafeTagExprs ) { if ( singleQuoted . length ( ) < 2 || singleQuoted . charAt ( 0 ) != '\'' || singleQuoted . charAt ( singleQuoted . length ( ) - 1 ) != '\'' ) { throw new IllegalArgumentException ( String . format ( "The cleanHtml directive expects arguments to be tag name string " + "literals, such as 'span'. Encountered: %s" , singleQuoted ) ) ; } String tagName = singleQuoted . substring ( 1 , singleQuoted . length ( ) - 1 ) ; OptionalSafeTag . fromTagName ( tagName ) ; } optionalSafeTagsArg = ", [" + ARG_JOINER . join ( optionalSafeTagExprs ) + "]" ; } return optionalSafeTagsArg ; } | Converts a list of TargetExpr s into a list of safe tags as an argument for the supported backends . This will iterate over the expressions ensure they re valid safe tags and convert them into an array of Strings . |
30,830 | private Optional < Expression > asRawTextOnly ( String name , RenderUnitNode renderUnit ) { StringBuilder builder = null ; List < SoyNode > children = new ArrayList < > ( renderUnit . getChildren ( ) ) ; for ( int i = 0 ; i < children . size ( ) ; i ++ ) { SoyNode child = children . get ( i ) ; if ( child instanceof MsgHtmlTagNode ) { children . addAll ( i + 1 , ( ( MsgHtmlTagNode ) child ) . getChildren ( ) ) ; continue ; } if ( child instanceof RawTextNode ) { if ( builder == null ) { builder = new StringBuilder ( ) ; } builder . append ( ( ( RawTextNode ) child ) . getRawText ( ) ) ; } else { return Optional . absent ( ) ; } } SanitizedContentKind kind = renderUnit . getContentKind ( ) ; Expression value = constant ( builder == null ? "" : builder . toString ( ) , parentVariables ) ; if ( kind == null ) { value = MethodRef . STRING_DATA_FOR_VALUE . invoke ( value ) ; } else { value = MethodRef . ORDAIN_AS_SAFE . invoke ( value , constantSanitizedContentKindAsContentKind ( kind ) ) ; } FieldRef staticField = parentVariables . addStaticField ( name , value ) ; return Optional . of ( staticField . accessor ( ) ) ; } | Returns an SoyValueProvider expression for the given RenderUnitNode if it is composed of only raw text . |
30,831 | public final void gen ( CodeBuilder adapter ) { boolean shouldClearIsGeneratingBit = false ; if ( Flags . DEBUG && ! isGenerating . get ( ) ) { isGenerating . set ( true ) ; shouldClearIsGeneratingBit = true ; } try { if ( location . isKnown ( ) ) { Label start = new Label ( ) ; adapter . mark ( start ) ; adapter . visitLineNumber ( location . getBeginLine ( ) , start ) ; } doGen ( adapter ) ; if ( location . isKnown ( ) ) { Label end = new Label ( ) ; adapter . mark ( end ) ; adapter . visitLineNumber ( location . getEndLine ( ) , end ) ; } } finally { if ( shouldClearIsGeneratingBit ) { isGenerating . set ( false ) ; } } } | Writes the bytecode to the adapter . |
30,832 | private void setCompileTimeGlobalsInternal ( ImmutableMap < String , PrimitiveData > compileTimeGlobalsMap ) { Preconditions . checkState ( compileTimeGlobals == null , "Compile-time globals already set." ) ; compileTimeGlobals = compileTimeGlobalsMap ; } | Sets the map from compile - time global name to value using Soy primitive types . |
30,833 | public SoyGeneralOptions setCompileTimeGlobals ( File compileTimeGlobalsFile ) throws IOException { setCompileTimeGlobalsInternal ( SoyUtils . parseCompileTimeGlobals ( Files . asCharSource ( compileTimeGlobalsFile , UTF_8 ) ) ) ; return this ; } | Sets the file containing compile - time globals . |
30,834 | public SoyGeneralOptions setCompileTimeGlobals ( URL compileTimeGlobalsResource ) throws IOException { setCompileTimeGlobalsInternal ( SoyUtils . parseCompileTimeGlobals ( Resources . asCharSource ( compileTimeGlobalsResource , UTF_8 ) ) ) ; return this ; } | Sets the resource file containing compile - time globals . |
30,835 | public String getStaticContent ( ) { if ( ! hasValue ( ) ) { return null ; } HtmlAttributeValueNode attrValue = ( HtmlAttributeValueNode ) getChild ( 1 ) ; if ( attrValue . numChildren ( ) == 0 ) { return "" ; } if ( attrValue . numChildren ( ) > 1 ) { return null ; } StandaloneNode attrValueNode = attrValue . getChild ( 0 ) ; if ( ! ( attrValueNode instanceof RawTextNode ) ) { return null ; } return ( ( RawTextNode ) attrValueNode ) . getRawText ( ) ; } | Returns the static value if one exists or null otherwise . |
30,836 | public static BidiGlobalDir decodeBidiGlobalDirFromJsOptions ( int bidiGlobalDir , boolean useGoogIsRtlForBidiGlobalDir ) { if ( bidiGlobalDir == 0 ) { if ( ! useGoogIsRtlForBidiGlobalDir ) { return null ; } return BidiGlobalDir . forIsRtlCodeSnippet ( GOOG_IS_RTL_CODE_SNIPPET , GOOG_IS_RTL_CODE_SNIPPET_NAMESPACE , SoyBackendKind . JS_SRC ) ; } Preconditions . checkState ( ! useGoogIsRtlForBidiGlobalDir , "Must not specify both bidiGlobalDir and bidiGlobalDirIsRtlCodeSnippet." ) ; Preconditions . checkArgument ( bidiGlobalDir == 1 || bidiGlobalDir == - 1 , "If specified, bidiGlobalDir must be 1 for LTR or -1 for RTL." ) ; return BidiGlobalDir . forStaticIsRtl ( bidiGlobalDir < 0 ) ; } | Decodes the bidi global directionality from the usual command line options used to specify it . Checks that at most one of the options was specified . |
30,837 | public static BidiGlobalDir decodeBidiGlobalDirFromPyOptions ( String bidiIsRtlFn ) { if ( bidiIsRtlFn == null || bidiIsRtlFn . isEmpty ( ) ) { return null ; } int dotIndex = bidiIsRtlFn . lastIndexOf ( '.' ) ; Preconditions . checkArgument ( dotIndex > 0 && dotIndex < bidiIsRtlFn . length ( ) - 1 , "If specified a bidiIsRtlFn must include the module path to allow for proper importing." ) ; String fnName = bidiIsRtlFn . substring ( dotIndex + 1 ) + "()" ; return BidiGlobalDir . forIsRtlCodeSnippet ( IS_RTL_MODULE_ALIAS + '.' + fnName , null , SoyBackendKind . PYTHON_SRC ) ; } | Decodes bidi global directionality from the Python bidiIsRtlFn command line option . |
30,838 | public void beforeBlock ( ) { if ( count > 0 ) { try { flush ( ) ; } catch ( IOException e ) { logger . log ( Level . SEVERE , "Flush from soy failed" , e ) ; } } } | Soy is about to block on a future . Flush the output stream if there is anything to flush so we use the time we are blocking to transfer as many bytes as possible . |
30,839 | public void updateNames ( List < String > escapeMapNames , List < String > matcherNames , List < String > filterNames ) { escapesName = escapeMapVar >= 0 ? escapeMapNames . get ( escapeMapVar ) : null ; matcherName = matcherVar >= 0 ? matcherNames . get ( matcherVar ) : null ; filterName = filterVar >= 0 ? filterNames . get ( filterVar ) : null ; } | Update the escaper matcher and filter names based on the supplied lists and indices . |
30,840 | public static SanitizedContent emptyString ( ContentKind kind ) { if ( kind == ContentKind . TEXT ) { return UnsanitizedString . create ( "" ) ; } return SanitizedContent . create ( "" , kind , Dir . NEUTRAL ) ; } | Creates an empty string constant . |
30,841 | public static SanitizedContent fromResource ( Class < ? > contextClass , String resourceName , Charset charset , ContentKind kind ) throws IOException { pretendValidateResource ( resourceName , kind ) ; return SanitizedContent . create ( Resources . toString ( Resources . getResource ( contextClass , resourceName ) , charset ) , kind , kind . getDefaultDir ( ) ) ; } | Loads assumed - safe content from a Java resource . |
30,842 | public static SanitizedContent constantUri ( final String constant ) { return fromConstant ( constant , ContentKind . URI , Dir . LTR ) ; } | Wraps an assumed - safe URI constant . |
30,843 | public static SanitizedContent constantHtml ( final String constant ) { return fromConstant ( constant , ContentKind . HTML , null ) ; } | Wraps an assumed - safe constant string that specifies a safe balanced document fragment . |
30,844 | public static SanitizedContent constantAttributes ( final String constant ) { return fromConstant ( constant , ContentKind . ATTRIBUTES , Dir . LTR ) ; } | Wraps an assumed - safe constant string that specifies an attribute . |
30,845 | public static SanitizedContent constantCss ( final String constant ) { return fromConstant ( constant , ContentKind . CSS , Dir . LTR ) ; } | Wraps an assumed - safe CSS constant . |
30,846 | public static SanitizedContent constantJs ( final String constant ) { return fromConstant ( constant , ContentKind . JS , Dir . LTR ) ; } | Wraps an assumed - safe JS constant . |
30,847 | public static SanitizedContent constantTrustedResourceUri ( final String constant ) { return fromConstant ( constant , ContentKind . TRUSTED_RESOURCE_URI , Dir . LTR ) ; } | Wraps an assumed - safe trusted_resource_uri constant . |
30,848 | public static SanitizedContent numberJs ( final long number ) { return SanitizedContent . create ( String . valueOf ( number ) , ContentKind . JS ) ; } | Creates JS from a number . |
30,849 | static void pretendValidateResource ( String resourceName , ContentKind kind ) { int index = resourceName . lastIndexOf ( '.' ) ; Preconditions . checkArgument ( index >= 0 , "Currently, we only validate resources with explicit extensions." ) ; String fileExtension = resourceName . substring ( index + 1 ) . toLowerCase ( ) ; switch ( kind ) { case JS : Preconditions . checkArgument ( fileExtension . equals ( "js" ) ) ; break ; case HTML : Preconditions . checkArgument ( SAFE_HTML_FILE_EXTENSIONS . contains ( fileExtension ) ) ; break ; case CSS : Preconditions . checkArgument ( fileExtension . equals ( "css" ) ) ; break ; default : throw new IllegalArgumentException ( "Don't know how to validate resources of kind " + kind ) ; } } | Very basic but strict validation that the resource s extension matches the content kind . |
30,850 | void doResolveOnto ( Appendable appendable ) throws IOException { doRender ( appendable ) ; content = appendable . toString ( ) ; if ( kind == null ) { resolved = StringData . forValue ( content ) ; } else { resolved = UnsafeSanitizedContentOrdainer . ordainAsSafe ( content , kind ) ; } } | Resolves the value by writing it to appendable |
30,851 | public final AbstractLoggingAdvisingAppendable appendLoggingFunctionInvocation ( LoggingFunctionInvocation funCall , ImmutableList < Function < String , String > > escapers ) throws IOException { if ( ! isLogOnly ( ) ) { doAppendLoggingFunctionInvocation ( funCall , escapers ) ; } return this ; } | Called whenever a logging function is being rendered . |
30,852 | public Expression generateMsgGroupVariable ( MsgFallbackGroupNode node ) { String tmpVarName = translationContext . nameGenerator ( ) . generateName ( "msg_s" ) ; Expression msg ; if ( node . numChildren ( ) == 1 ) { translationContext . soyToJsVariableMappings ( ) . setIsPrimaryMsgInUse ( node , Expression . LITERAL_TRUE ) ; msg = generateSingleMsgVariable ( node . getChild ( 0 ) , tmpVarName ) ; } else { msg = generateMsgGroupVariable ( node , tmpVarName ) ; } for ( SoyPrintDirective printDirective : node . getEscapingDirectives ( ) ) { msg = SoyJsPluginUtils . applyDirective ( msg , ( SoyJsSrcPrintDirective ) printDirective , ImmutableList . of ( ) , node . getSourceLocation ( ) , errorReporter ) ; } return msg ; } | Returns a code chunk representing a translated variable . |
30,853 | private String buildGoogMsgVarNameHelper ( MsgNode msgNode ) { String desiredName = jsSrcOptions . googMsgsAreExternal ( ) ? "MSG_EXTERNAL_" + MsgUtils . computeMsgIdForDualFormat ( msgNode ) : "MSG_UNNAMED" ; return translationContext . nameGenerator ( ) . generateName ( desiredName ) ; } | Builds the googMsgVarName for an MsgNode . |
30,854 | protected Expression genGoogMsgPlaceholder ( MsgPlaceholderNode msgPhNode ) { List < Expression > contentChunks = new ArrayList < > ( ) ; for ( StandaloneNode contentNode : msgPhNode . getChildren ( ) ) { if ( contentNode instanceof MsgHtmlTagNode && ! isComputableAsJsExprsVisitor . exec ( contentNode ) ) { visit ( contentNode ) ; contentChunks . add ( id ( "htmlTag" + contentNode . getId ( ) ) ) ; } else if ( contentNode instanceof CallNode ) { CallNode callNode = ( CallNode ) contentNode ; for ( CallParamNode grandchild : callNode . getChildren ( ) ) { if ( grandchild instanceof CallParamContentNode && ! isComputableAsJsExprsVisitor . exec ( grandchild ) ) { visit ( grandchild ) ; } } Expression call = genCallCodeUtils . gen ( callNode , templateAliases , translationContext , errorReporter , master . getExprTranslator ( ) ) ; contentChunks . add ( call ) ; } else { List < Expression > chunks = genJsExprsVisitor . exec ( contentNode ) ; contentChunks . add ( CodeChunkUtils . concatChunks ( chunks ) ) ; } } return CodeChunkUtils . concatChunks ( contentChunks ) ; } | Returns a code chunk for the given placeholder node . |
30,855 | public void run ( HtmlMatcherGraph htmlMatcherGraph ) { if ( ! htmlMatcherGraph . getRootNode ( ) . isPresent ( ) ) { return ; } visit ( htmlMatcherGraph . getRootNode ( ) . get ( ) ) ; for ( HtmlTagNode tag : annotationMap . keySet ( ) ) { if ( tag instanceof HtmlOpenTagNode ) { HtmlOpenTagNode openTag = ( HtmlOpenTagNode ) tag ; if ( annotationMap . containsEntry ( openTag , INVALID_NODE ) ) { if ( annotationMap . get ( openTag ) . size ( ) == 1 ) { errorReporter . report ( openTag . getSourceLocation ( ) , makeSoyErrorKind ( UNEXPECTED_OPEN_TAG_ALWAYS ) ) ; } else { errorReporter . report ( openTag . getSourceLocation ( ) , makeSoyErrorKind ( UNEXPECTED_OPEN_TAG_SOMETIMES ) ) ; } } } } if ( ! errorReporter . getErrors ( ) . isEmpty ( ) && inCondition ) { return ; } for ( HtmlTagNode openTag : annotationMap . keySet ( ) ) { for ( Optional < HtmlTagNode > closeTag : annotationMap . get ( openTag ) ) { if ( closeTag . isPresent ( ) ) { openTag . addTagPair ( closeTag . get ( ) ) ; closeTag . get ( ) . addTagPair ( openTag ) ; } } } } | Runs the HtmlTagMatchingPass . |
30,856 | private void injectCloseTag ( HtmlOpenTagNode optionalOpenTag , HtmlTagNode destinationTag , IdGenerator idGenerator ) { StandaloneNode openTagCopy = optionalOpenTag . getTagName ( ) . getNode ( ) . copy ( new CopyState ( ) ) ; HtmlCloseTagNode syntheticClose = new HtmlCloseTagNode ( idGenerator . genId ( ) , openTagCopy , optionalOpenTag . getSourceLocation ( ) , TagExistence . SYNTHETIC ) ; if ( destinationTag == null ) { int i = optionalOpenTag . getParent ( ) . getChildren ( ) . size ( ) ; optionalOpenTag . getParent ( ) . addChild ( i , syntheticClose ) ; } else { ParentSoyNode < StandaloneNode > openTagParent = destinationTag . getParent ( ) ; int i = openTagParent . getChildIndex ( destinationTag ) ; openTagParent . addChild ( i , syntheticClose ) ; } annotationMap . put ( optionalOpenTag , Optional . of ( syntheticClose ) ) ; annotationMap . put ( syntheticClose , Optional . of ( optionalOpenTag ) ) ; } | Rebalances HTML tags when necessary . |
30,857 | private void visit ( HtmlMatcherBlockNode blockNode , Map < Equivalence . Wrapper < ExprNode > , Boolean > exprValueMap , HtmlStack stack ) { if ( blockNode . getGraph ( ) . getRootNode ( ) . isPresent ( ) ) { new HtmlTagMatchingPass ( errorReporter , idGenerator , false , stack . inForeignContent , blockNode . getParentBlockType ( ) ) . run ( blockNode . getGraph ( ) ) ; } Optional < HtmlMatcherGraphNode > nextNode = blockNode . getNodeForEdgeKind ( EdgeKind . TRUE_EDGE ) ; if ( nextNode . isPresent ( ) ) { visit ( nextNode . get ( ) , exprValueMap , stack ) ; } else { checkUnusedTags ( stack ) ; } } | Blocks must be internally balanced but require knowing if they are in foreign content or not . Recursively run the tag matcher and throw away the result . |
30,858 | private void visit ( HtmlMatcherAccumulatorNode accNode , Map < Equivalence . Wrapper < ExprNode > , Boolean > exprValueMap , HtmlStack stack ) { Optional < HtmlMatcherGraphNode > nextNode = accNode . getNodeForEdgeKind ( EdgeKind . TRUE_EDGE ) ; if ( nextNode . isPresent ( ) ) { visit ( nextNode . get ( ) , exprValueMap , stack ) ; } else { checkUnusedTags ( stack ) ; } } | Accumulator nodes mostly work like HTMLMatcherTagNodes but don t add any elements . |
30,859 | public static Expression asBoxedList ( List < SoyExpression > items ) { List < Expression > childExprs = new ArrayList < > ( items . size ( ) ) ; for ( SoyExpression child : items ) { childExprs . add ( child . box ( ) ) ; } return BytecodeUtils . asList ( childExprs ) ; } | Returns an Expression that evaluates to a list containing all the items as boxed soy values . |
30,860 | private static void doBox ( CodeBuilder adapter , SoyRuntimeType type ) { if ( type . isKnownSanitizedContent ( ) ) { FieldRef . enumReference ( ContentKind . valueOf ( ( ( SanitizedType ) type . soyType ( ) ) . getContentKind ( ) . name ( ) ) ) . accessStaticUnchecked ( adapter ) ; MethodRef . ORDAIN_AS_SAFE . invokeUnchecked ( adapter ) ; } else if ( type . isKnownString ( ) ) { MethodRef . STRING_DATA_FOR_VALUE . invokeUnchecked ( adapter ) ; } else if ( type . isKnownListOrUnionOfLists ( ) ) { MethodRef . LIST_IMPL_FOR_PROVIDER_LIST . invokeUnchecked ( adapter ) ; } else if ( type . isKnownLegacyObjectMapOrUnionOfMaps ( ) ) { FieldRef . enumReference ( RuntimeMapTypeTracker . Type . LEGACY_OBJECT_MAP_OR_RECORD ) . putUnchecked ( adapter ) ; MethodRef . DICT_IMPL_FOR_PROVIDER_MAP . invokeUnchecked ( adapter ) ; } else if ( type . isKnownMapOrUnionOfMaps ( ) ) { MethodRef . MAP_IMPL_FOR_PROVIDER_MAP . invokeUnchecked ( adapter ) ; } else if ( type . isKnownProtoOrUnionOfProtos ( ) ) { MethodRef . SOY_PROTO_VALUE_CREATE . invokeUnchecked ( adapter ) ; } else { throw new IllegalStateException ( "Can't box soy expression of type " + type ) ; } } | Generates code to box the expression assuming that it is non - nullable and on the top of the stack . |
30,861 | public SoyExpression coerceToBoolean ( ) { if ( BytecodeUtils . isPrimitive ( resultType ( ) ) ) { return coercePrimitiveToBoolean ( ) ; } if ( soyType ( ) . equals ( NullType . getInstance ( ) ) ) { return FALSE ; } if ( delegate . isNonNullable ( ) ) { return coerceNonNullableReferenceTypeToBoolean ( ) ; } else { final Label end = new Label ( ) ; return withSource ( new Expression ( delegate . resultType ( ) , delegate . features ( ) ) { protected void doGen ( CodeBuilder adapter ) { delegate . gen ( adapter ) ; adapter . dup ( ) ; Label nonNull = new Label ( ) ; adapter . ifNonNull ( nonNull ) ; adapter . pop ( ) ; adapter . pushBoolean ( false ) ; adapter . goTo ( end ) ; adapter . mark ( nonNull ) ; } } ) . asNonNullable ( ) . coerceToBoolean ( ) . labelEnd ( end ) ; } } | Coerce this expression to a boolean value . |
30,862 | public SoyExpression coerceToString ( ) { if ( soyRuntimeType . isKnownString ( ) && ! isBoxed ( ) ) { return this ; } if ( BytecodeUtils . isPrimitive ( resultType ( ) ) ) { if ( resultType ( ) . equals ( Type . BOOLEAN_TYPE ) ) { return forString ( MethodRef . BOOLEAN_TO_STRING . invoke ( delegate ) ) ; } else if ( resultType ( ) . equals ( Type . DOUBLE_TYPE ) ) { return forString ( MethodRef . DOUBLE_TO_STRING . invoke ( delegate ) ) ; } else if ( resultType ( ) . equals ( Type . LONG_TYPE ) ) { return forString ( MethodRef . LONG_TO_STRING . invoke ( delegate ) ) ; } else { throw new AssertionError ( "resultType(): " + resultType ( ) + " is not a valid type for a SoyExpression" ) ; } } if ( ! isBoxed ( ) ) { return forString ( MethodRef . STRING_VALUE_OF . invoke ( delegate ) ) ; } return forString ( MethodRef . RUNTIME_COERCE_TO_STRING . invoke ( delegate ) ) ; } | Coerce this expression to a string value . |
30,863 | public SoyExpression coerceToDouble ( ) { if ( ! isBoxed ( ) ) { if ( soyRuntimeType . isKnownFloat ( ) ) { return this ; } if ( soyRuntimeType . isKnownInt ( ) ) { return forFloat ( BytecodeUtils . numericConversion ( delegate , Type . DOUBLE_TYPE ) ) ; } throw new UnsupportedOperationException ( "Can't convert " + resultType ( ) + " to a double" ) ; } if ( soyRuntimeType . isKnownFloat ( ) ) { return forFloat ( delegate . invoke ( MethodRef . SOY_VALUE_FLOAT_VALUE ) ) ; } return forFloat ( delegate . invoke ( MethodRef . SOY_VALUE_NUMBER_VALUE ) ) ; } | Coerce this expression to a double value . Useful for float - int comparisons . |
30,864 | public static com . liferay . commerce . price . list . model . CommercePriceListAccountRel getCommercePriceListAccountRel ( long commercePriceListAccountRelId ) throws com . liferay . portal . kernel . exception . PortalException { return getService ( ) . getCommercePriceListAccountRel ( commercePriceListAccountRelId ) ; } | Returns the commerce price list account rel with the primary key . |
30,865 | @ Indexable ( type = IndexableType . DELETE ) public CommerceNotificationTemplateUserSegmentRel deleteCommerceNotificationTemplateUserSegmentRel ( long commerceNotificationTemplateUserSegmentRelId ) throws PortalException { return commerceNotificationTemplateUserSegmentRelPersistence . remove ( commerceNotificationTemplateUserSegmentRelId ) ; } | Deletes the commerce notification template user segment rel with the primary key from the database . Also notifies the appropriate model listeners . |
30,866 | @ Indexable ( type = IndexableType . DELETE ) public CommerceNotificationTemplateUserSegmentRel deleteCommerceNotificationTemplateUserSegmentRel ( CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel ) { return commerceNotificationTemplateUserSegmentRelPersistence . remove ( commerceNotificationTemplateUserSegmentRel ) ; } | Deletes the commerce notification template user segment rel from the database . Also notifies the appropriate model listeners . |
30,867 | public void setCommerceNotificationAttachmentLocalService ( com . liferay . commerce . notification . service . CommerceNotificationAttachmentLocalService commerceNotificationAttachmentLocalService ) { this . commerceNotificationAttachmentLocalService = commerceNotificationAttachmentLocalService ; } | Sets the commerce notification attachment local service . |
30,868 | public void setCommerceNotificationQueueEntryLocalService ( com . liferay . commerce . notification . service . CommerceNotificationQueueEntryLocalService commerceNotificationQueueEntryLocalService ) { this . commerceNotificationQueueEntryLocalService = commerceNotificationQueueEntryLocalService ; } | Sets the commerce notification queue entry local service . |
30,869 | public void setCommerceNotificationTemplateLocalService ( com . liferay . commerce . notification . service . CommerceNotificationTemplateLocalService commerceNotificationTemplateLocalService ) { this . commerceNotificationTemplateLocalService = commerceNotificationTemplateLocalService ; } | Sets the commerce notification template local service . |
30,870 | public void setCounterLocalService ( com . liferay . counter . kernel . service . CounterLocalService counterLocalService ) { this . counterLocalService = counterLocalService ; } | Sets the counter local service . |
30,871 | public void setClassNameLocalService ( com . liferay . portal . kernel . service . ClassNameLocalService classNameLocalService ) { this . classNameLocalService = classNameLocalService ; } | Sets the class name local service . |
30,872 | public void setResourceLocalService ( com . liferay . portal . kernel . service . ResourceLocalService resourceLocalService ) { this . resourceLocalService = resourceLocalService ; } | Sets the resource local service . |
30,873 | public void setUserLocalService ( com . liferay . portal . kernel . service . UserLocalService userLocalService ) { this . userLocalService = userLocalService ; } | Sets the user local service . |
30,874 | public void setCPAttachmentFileEntryLocalService ( com . liferay . commerce . product . service . CPAttachmentFileEntryLocalService cpAttachmentFileEntryLocalService ) { this . cpAttachmentFileEntryLocalService = cpAttachmentFileEntryLocalService ; } | Sets the cp attachment file entry local service . |
30,875 | public void setCPAttachmentFileEntryService ( com . liferay . commerce . product . service . CPAttachmentFileEntryService cpAttachmentFileEntryService ) { this . cpAttachmentFileEntryService = cpAttachmentFileEntryService ; } | Sets the cp attachment file entry remote service . |
30,876 | public void setCPDefinitionLocalService ( com . liferay . commerce . product . service . CPDefinitionLocalService cpDefinitionLocalService ) { this . cpDefinitionLocalService = cpDefinitionLocalService ; } | Sets the cp definition local service . |
30,877 | public void setCPDefinitionService ( com . liferay . commerce . product . service . CPDefinitionService cpDefinitionService ) { this . cpDefinitionService = cpDefinitionService ; } | Sets the cp definition remote service . |
30,878 | public void setCPDefinitionLinkLocalService ( com . liferay . commerce . product . service . CPDefinitionLinkLocalService cpDefinitionLinkLocalService ) { this . cpDefinitionLinkLocalService = cpDefinitionLinkLocalService ; } | Sets the cp definition link local service . |
30,879 | public void setCPDefinitionLinkService ( com . liferay . commerce . product . service . CPDefinitionLinkService cpDefinitionLinkService ) { this . cpDefinitionLinkService = cpDefinitionLinkService ; } | Sets the cp definition link remote service . |
30,880 | public void setCPDefinitionOptionRelLocalService ( com . liferay . commerce . product . service . CPDefinitionOptionRelLocalService cpDefinitionOptionRelLocalService ) { this . cpDefinitionOptionRelLocalService = cpDefinitionOptionRelLocalService ; } | Sets the cp definition option rel local service . |
30,881 | public void setCPDefinitionOptionRelService ( com . liferay . commerce . product . service . CPDefinitionOptionRelService cpDefinitionOptionRelService ) { this . cpDefinitionOptionRelService = cpDefinitionOptionRelService ; } | Sets the cp definition option rel remote service . |
30,882 | public void setCPDefinitionOptionValueRelLocalService ( com . liferay . commerce . product . service . CPDefinitionOptionValueRelLocalService cpDefinitionOptionValueRelLocalService ) { this . cpDefinitionOptionValueRelLocalService = cpDefinitionOptionValueRelLocalService ; } | Sets the cp definition option value rel local service . |
30,883 | public void setCPDefinitionOptionValueRelService ( com . liferay . commerce . product . service . CPDefinitionOptionValueRelService cpDefinitionOptionValueRelService ) { this . cpDefinitionOptionValueRelService = cpDefinitionOptionValueRelService ; } | Sets the cp definition option value rel remote service . |
30,884 | public void setCPDefinitionSpecificationOptionValueLocalService ( com . liferay . commerce . product . service . CPDefinitionSpecificationOptionValueLocalService cpDefinitionSpecificationOptionValueLocalService ) { this . cpDefinitionSpecificationOptionValueLocalService = cpDefinitionSpecificationOptionValueLocalService ; } | Sets the cp definition specification option value local service . |
30,885 | public void setCPDefinitionSpecificationOptionValueService ( com . liferay . commerce . product . service . CPDefinitionSpecificationOptionValueService cpDefinitionSpecificationOptionValueService ) { this . cpDefinitionSpecificationOptionValueService = cpDefinitionSpecificationOptionValueService ; } | Sets the cp definition specification option value remote service . |
30,886 | public void setCPDisplayLayoutLocalService ( com . liferay . commerce . product . service . CPDisplayLayoutLocalService cpDisplayLayoutLocalService ) { this . cpDisplayLayoutLocalService = cpDisplayLayoutLocalService ; } | Sets the cp display layout local service . |
30,887 | public void setCPFriendlyURLEntryLocalService ( com . liferay . commerce . product . service . CPFriendlyURLEntryLocalService cpFriendlyURLEntryLocalService ) { this . cpFriendlyURLEntryLocalService = cpFriendlyURLEntryLocalService ; } | Sets the cp friendly url entry local service . |
30,888 | public void setCPInstanceLocalService ( com . liferay . commerce . product . service . CPInstanceLocalService cpInstanceLocalService ) { this . cpInstanceLocalService = cpInstanceLocalService ; } | Sets the cp instance local service . |
30,889 | public void setCPInstanceService ( com . liferay . commerce . product . service . CPInstanceService cpInstanceService ) { this . cpInstanceService = cpInstanceService ; } | Sets the cp instance remote service . |
30,890 | public void setCPMeasurementUnitLocalService ( com . liferay . commerce . product . service . CPMeasurementUnitLocalService cpMeasurementUnitLocalService ) { this . cpMeasurementUnitLocalService = cpMeasurementUnitLocalService ; } | Sets the cp measurement unit local service . |
30,891 | public void setCPMeasurementUnitService ( com . liferay . commerce . product . service . CPMeasurementUnitService cpMeasurementUnitService ) { this . cpMeasurementUnitService = cpMeasurementUnitService ; } | Sets the cp measurement unit remote service . |
30,892 | public void setCPOptionLocalService ( com . liferay . commerce . product . service . CPOptionLocalService cpOptionLocalService ) { this . cpOptionLocalService = cpOptionLocalService ; } | Sets the cp option local service . |
30,893 | public void setCPOptionService ( com . liferay . commerce . product . service . CPOptionService cpOptionService ) { this . cpOptionService = cpOptionService ; } | Sets the cp option remote service . |
30,894 | public void setCPOptionCategoryLocalService ( com . liferay . commerce . product . service . CPOptionCategoryLocalService cpOptionCategoryLocalService ) { this . cpOptionCategoryLocalService = cpOptionCategoryLocalService ; } | Sets the cp option category local service . |
30,895 | public void setCPOptionCategoryService ( com . liferay . commerce . product . service . CPOptionCategoryService cpOptionCategoryService ) { this . cpOptionCategoryService = cpOptionCategoryService ; } | Sets the cp option category remote service . |
30,896 | public void setCPOptionValueLocalService ( com . liferay . commerce . product . service . CPOptionValueLocalService cpOptionValueLocalService ) { this . cpOptionValueLocalService = cpOptionValueLocalService ; } | Sets the cp option value local service . |
30,897 | public void setCPOptionValueService ( com . liferay . commerce . product . service . CPOptionValueService cpOptionValueService ) { this . cpOptionValueService = cpOptionValueService ; } | Sets the cp option value remote service . |
30,898 | public void setCProductLocalService ( com . liferay . commerce . product . service . CProductLocalService cProductLocalService ) { this . cProductLocalService = cProductLocalService ; } | Sets the c product local service . |
30,899 | public void setCPRuleLocalService ( com . liferay . commerce . product . service . CPRuleLocalService cpRuleLocalService ) { this . cpRuleLocalService = cpRuleLocalService ; } | Sets the cp rule local service . |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.