idx
int64
0
165k
question
stringlengths
73
5.81k
target
stringlengths
5
918
160,600
@ Path ( "/verifyInjectedOptionalCustomMissing" ) @ Produces ( MediaType . APPLICATION_JSON ) public JsonObject verifyInjectedOptionalCustomMissing ( ) { boolean pass = false ; String msg ; Optional < Long > customValue = custom . getValue ( ) ; if ( customValue == null ) { msg = "custom-missing value is null, FAIL" ; ...
Verify that values exist and that types match the corresponding Claims enum
160,601
public static void addExtendedProperty ( String propName , String dataType , boolean multiValued , Object defaultValue ) { if ( dataType == null || "null" . equalsIgnoreCase ( dataType ) ) return ; if ( extendedPropertiesDataType . containsKey ( propName ) ) { Tr . warning ( tc , WIMMessageKey . DUPLICATE_PROPERTY_EXTE...
Allows for an extended property or a property not pre - defined as part of this PersonAccount entity type to be added to the PersonAccount entity
160,602
private static String depluralize ( String s ) { if ( s . endsWith ( "ies" ) ) { return s . substring ( 0 , s . length ( ) - 3 ) + 'y' ; } if ( s . endsWith ( "s" ) ) { return s . substring ( 0 , s . length ( ) - 1 ) ; } return s ; }
Convert a string like abcs to abc .
160,603
private static String hyphenatedToCamelCase ( String s ) { Matcher m = Pattern . compile ( "(?:^|-)([a-z])" ) . matcher ( s ) ; StringBuilder b = new StringBuilder ( ) ; int last = 0 ; for ( ; m . find ( ) ; last = m . end ( ) ) { b . append ( s , last , m . start ( ) ) . append ( Character . toUpperCase ( m . group ( ...
Convert a string like abc - def - ghi to AbcDefGhi .
160,604
private static String upperCaseFirstChar ( String s ) { return Character . toUpperCase ( s . charAt ( 0 ) ) + s . substring ( 1 ) ; }
Convert a string like abcDef to AbcDef .
160,605
private static List < TypeMirror > getAnnotationClassValues ( Element member , Annotation annotation , String annotationMemberName ) { for ( AnnotationMirror annotationMirror : member . getAnnotationMirrors ( ) ) { if ( ( ( TypeElement ) annotationMirror . getAnnotationType ( ) . asElement ( ) ) . getQualifiedName ( ) ...
Return a List of TypeMirror for an annotation on a member . This is a workaround for JDK - 6519115 which causes MirroredTypeException to be thrown rather than MirroredTypesException .
160,606
public ViewScopeContextualStorage getContextualStorage ( BeanManager beanManager , String viewScopeId ) { ViewScopeContextualStorage contextualStorage = storageMap . get ( viewScopeId ) ; if ( contextualStorage == null ) { synchronized ( this ) { contextualStorage = storageMap . get ( viewScopeId ) ; if ( contextualSto...
This method will return the ViewScopeContextualStorage or create a new one if no one is yet assigned to the current windowId .
160,607
public AuthConfigProvider setProvider ( ProviderService providerService ) { AuthConfigProvider authConfigProvider = null ; if ( providerService != null ) { authConfigProvider = providerService . getAuthConfigProvider ( this ) ; registerConfigProvider ( authConfigProvider , null , null , null ) ; } else { removeRegistra...
Called when a Liberty user defined feature provider is set or unset
160,608
protected BeanO doActivation ( EJBThreadData threadData , ContainerTx tx , BeanId beanId , boolean takeInvocationRef ) throws RemoteException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . entry ( tc , "doActivation" , new Object [ ] { tx , beanId , new Boolean ( takeInvocationRef )...
Internal method used by subclasses to activate a bean
160,609
public Entry < BatchPartitionWorkUnit , Future < ? > > startPartition ( PartitionPlanConfig partitionPlanConfig , Step step , PartitionReplyQueue partitionReplyQueue , boolean isRemoteDispatch ) { BatchPartitionWorkUnit workUnit = createPartitionWorkUnit ( partitionPlanConfig , step , partitionReplyQueue , isRemoteDisp...
Create the BatchPartitionWorkUnit and start the sub - job partition thread .
160,610
protected void setConversation ( Conversation conversation ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "setConversation" , conversation ) ; con = conversation ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( this ,...
Sets the Conversation object
160,611
protected CommsByteBuffer jfapExchange ( CommsByteBuffer buffer , int sendSegmentType , int priority , boolean canPoolOnReceive ) throws SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "jfapExchange" , new Object ...
Wraps the JFAP Channel exchange method to allow tracing retrieval of Unique request numbers and setting of message priority .
160,612
protected void jfapSend ( CommsByteBuffer buffer , int sendSegType , int priority , boolean canPoolOnReceive , ThrottlingPolicy throttlingPolicy ) throws SIConnectionDroppedException , SIConnectionLostException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "jfa...
Wraps the JFAP Channel send method to allow tracing retrieval of Unique request numbers and setting of message priority .
160,613
private short getClientCapabilities ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getClientCapabilities" ) ; short capabilities = CommsConstants . CAPABILITIES_DEFAULT ; boolean nonJavaBootstrap = CommsUtils . getRuntimeBooleanProperty ( CommsConstants . C...
Works out the capabilities that will be sent to the peer as part of the initial handshake . This also takes into account any overrides from the SIB properties file .
160,614
public void defaultChecker ( CommsByteBuffer buffer , short exceptionCode ) throws SIErrorException { if ( exceptionCode != CommsConstants . SI_NO_EXCEPTION ) { throw new SIErrorException ( buffer . getException ( con ) ) ; } }
The default checker . Should always be called last after all the checkers .
160,615
protected void invalidateConnection ( boolean notifyPeer , Throwable throwable , String debugReason ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "invalidateConnection" , new Object [ ] { new Boolean ( notifyPeer ) , throwable , debugReason } ) ; if ( con != null ) ...
Utility method to invalidate Connection . Parameters passed to ConnectionInterface . invalidate
160,616
SibRaListener createListener ( final SIDestinationAddress destination , MessageEndpointFactory messageEndpointFactory ) throws ResourceException { final String methodName = "createListener" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , new ...
Creates a new listener to the given destination .
160,617
SibRaDispatcher createDispatcher ( final AbstractConsumerSession session , final Reliability unrecoveredReliability , final int maxFailedDeliveries , final int sequentialFailureThreshold ) throws ResourceException { final String methodName = "createDispatcher" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . ...
Gets a dispatcher for the given session and messages .
160,618
void closeDispatcher ( final SibRaDispatcher dispatcher ) { final String methodName = "closeDispatcher" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } dispatcher . close ( ) ; _dispatcherCount . decrementAndGet ( ) ; if ( TraceComponent ...
Closes the given dispatcher .
160,619
void close ( ) { final String methodName = "close" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } close ( false ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( this , TRACE , methodName ...
Closes the connection and any associated listeners and dispatchers
160,620
void close ( boolean alreadyClosed ) { final String methodName = "close" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName , alreadyClosed ) ; } _closed = true ; if ( ! alreadyClosed ) { for ( final Iterator iterator = _listeners . values ( ) . i...
Closes this connection and any associated listeners and dispatchers .
160,621
SICoreConnection createConnection ( SICoreConnectionFactory factory , String name , String password , Map properties , String busName ) throws SIException , SIErrorException , Exception { final String methodName = "createConnection" ; if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr...
Creates this connection using either the Auth Alias supplied or if the property is set the WAS server subject .
160,622
private String getUnavailableServices ( ) { StringBuilder missingServices = new StringBuilder ( ) ; if ( tokenService . getReference ( ) == null ) { missingServices . append ( "tokenService, " ) ; } if ( tokenManager . getReference ( ) == null ) { missingServices . append ( "tokenManager, " ) ; } if ( authenticationSer...
Construct a String that lists all of the missing services . This is very useful for debugging .
160,623
private void updateSecurityReadyState ( ) { if ( ! activated ) { return ; } String unavailableServices = getUnavailableServices ( ) ; if ( unavailableServices == null ) { Tr . info ( tc , "SECURITY_SERVICE_READY" ) ; securityReady = true ; Dictionary < String , Object > props = new Hashtable < String , Object > ( ) ; p...
Security is ready when all of these required services have been registered .
160,624
private void parseDirectoryFiles ( WsResource directory , ServerConfiguration configuration ) throws ConfigParserException , ConfigValidationException { if ( directory != null ) { File [ ] defaultFiles = getChildXMLFiles ( directory ) ; if ( defaultFiles == null ) return ; Arrays . sort ( defaultFiles , new AlphaCompar...
Parse all of the config files in a directory in platform insensitive alphabetical order
160,625
public ServletContext findContext ( String path ) { WebGroup g = ( WebGroup ) requestMapper . map ( path ) ; if ( g != null ) return g . getContext ( ) ; else return null ; }
Method findContext .
160,626
private void addWlpInformation ( Asset asset ) { WlpInformation wlpInfo = asset . getWlpInformation ( ) ; if ( wlpInfo == null ) { wlpInfo = new WlpInformation ( ) ; asset . setWlpInformation ( wlpInfo ) ; } if ( wlpInfo . getAppliesToFilterInfo ( ) == null ) { wlpInfo . setAppliesToFilterInfo ( new ArrayList < Applies...
For historic reasons when an asset is read back from the repository the wlpInformation and ATFI should always be present . This method does that .
160,627
public Discriminator getDiscriminator ( ) { if ( tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "getDiscriminator" ) ; if ( tc . isEntryEnabled ( ) ) SibTr . exit ( this , tc , "getDiscriminator" , discriminator ) ; return discriminator ; }
Returns the discriminator for this channel .
160,628
private Object getResult ( ) throws InterruptedException , ExecutionException { if ( ivCancelled ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getResult: throwing CancellationException" ) ; } throw new CancellationException ( ) ; } if ( ivException != null ) { if ( T...
This get method returns the result of the async method call . This method must not be called unless ivGate indicates that results are available .
160,629
private Object getResult ( long timeout , TimeUnit unit ) throws InterruptedException , ExecutionException , TimeoutException { if ( ivCancelled ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { Tr . exit ( tc , "getResult: throwing CancellationException" ) ; } throw new CancellationExcep...
This get method returns the result of the asynch method call . This method must not be called unless ivGate indicates that results are available .
160,630
public boolean isCancelled ( ) { boolean cancelled = ivCancelled ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "isCancelled: " + cancelled + " Future object: " + this ) ; } return ( cancelled ) ; }
This method allows clients to check the Future object to see if the asynch method was canceled before it got a chance to execute .
160,631
void setResult ( Future < ? > theFuture ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setResult: " + Util . identity ( theFuture ) + " Future object: " + this ) ; } ivFuture = theFuture ; done ( ) ; }
did not throw an exception .
160,632
void setException ( Throwable theException ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "setException - Future object: " + this , theException ) ; } ivException = theException ; done ( ) ; }
The async method ended with an exception
160,633
public Object saveState ( FacesContext context ) { if ( ! initialStateMarked ( ) ) { Object values [ ] = new Object [ 2 ] ; values [ 0 ] = _maximum ; values [ 1 ] = _minimum ; return values ; } return null ; }
RESTORE & SAVE STATE
160,634
public void logout ( Subject subject ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "logout" ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . exit ( tc , CLASS_NAME + "logout" ) ; } }
Logout method is used only for auditing purpose
160,635
public void setMessagingAuthenticationService ( MessagingAuthenticationService messagingAuthenticationService ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , CLASS_NAME + "setMessagingAuthenticationService" , messagingAuthenticationService ) ; } this . messagingAuth...
Set the MessagingAuthenticationService
160,636
public void deactivate ( ComponentContext cc ) throws IOException { ConfigProviderResolver . setInstance ( null ) ; shutdown ( ) ; scheduledExecutorServiceRef . deactivate ( cc ) ; }
Deactivate a context and set the instance to null
160,637
public void shutdown ( ) { synchronized ( configCache ) { Set < ClassLoader > allClassLoaders = new HashSet < > ( ) ; allClassLoaders . addAll ( configCache . keySet ( ) ) ; for ( ClassLoader classLoader : allClassLoaders ) { close ( classLoader ) ; } configCache . clear ( ) ; appClassLoaderMap . clear ( ) ; } }
Close down all the configs
160,638
private void close ( ClassLoader classLoader ) { synchronized ( configCache ) { ConfigWrapper config = configCache . remove ( classLoader ) ; if ( config != null ) { Set < String > applicationNames = config . getApplications ( ) ; for ( String app : applicationNames ) { appClassLoaderMap . remove ( app ) ; } config . c...
Completely close a config for a given classloader
160,639
private void closeConfig ( Config config ) { if ( config instanceof WebSphereConfig ) { try { ( ( WebSphereConfig ) config ) . close ( ) ; } catch ( IOException e ) { throw new ConfigException ( Tr . formatMessage ( tc , "could.not.close.CWMCG0004E" , e ) ) ; } } }
Close a given config if it s a WebSphereConfig
160,640
public SICoreConnection getSICoreConnection ( ) throws IllegalStateException { if ( connectionClosed ) { throw new IllegalStateException ( NLS . getFormattedMessage ( ( "ILLEGAL_STATE_CWSJR1086" ) , new Object [ ] { "getSICoreConnection" } , null ) ) ; } return _coreConnection ; }
Returns the core connection created for and associated with this connection .
160,641
synchronized public void close ( ) throws SIConnectionLostException , SIIncorrectCallException , SIResourceException , SIErrorException , SIConnectionDroppedException , SIConnectionUnavailableException { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , "clos...
Closes this connection its associated core connection and any sessions created from it .
160,642
private static boolean isRunningInWAS ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "isRunningInWAS" ) ; } if ( inWAS == null ) { inWAS = Boolean . TRUE ; } if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . exit ( TRAC...
Returns true if running in WAS . The check is to see if com . ibm . tx . jta . Transaction . TransactionManagerFactory is on the classpath .
160,643
private static final Object getCurrentUOWCoord ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && TRACE . isEntryEnabled ( ) ) { SibTr . entry ( TRACE , "getCurrentUOWCoord" ) ; } Object currentUOW = null ; if ( isRunningInWAS ( ) ) { currentUOW = EmbeddableTransactionManagerFactory . getUOWCurrent ( ) . getUOWCoor...
This method uses reflection to try and obtain the current UOW if we are not inside WAS null is returned .
160,644
private PostCreateAction listenForLibraryChanges ( final String libid ) { return new PostCreateAction ( ) { public void invoke ( AppClassLoader acl ) { listenForLibraryChanges ( libid , acl ) ; } } ; }
create an action that will create a listener when invoked
160,645
private void listenForLibraryChanges ( String libid , AppClassLoader acl ) { new WeakLibraryListener ( libid , acl . getKey ( ) . getId ( ) , acl , bundleContext ) { protected void update ( ) { Object cl = get ( ) ; if ( cl instanceof AppClassLoader && aclStore != null ) aclStore . remove ( ( AppClassLoader ) cl ) ; de...
create a listener to remove a loader from the canonical store on library update
160,646
private String getTopic ( BundleEvent bundleEvent ) { StringBuilder topic = new StringBuilder ( BUNDLE_EVENT_TOPIC_PREFIX ) ; switch ( bundleEvent . getType ( ) ) { case BundleEvent . INSTALLED : topic . append ( "INSTALLED" ) ; break ; case BundleEvent . STARTED : topic . append ( "STARTED" ) ; break ; case BundleEven...
Determine the appropriate topic to use for the Bundle Event .
160,647
public PmiDataInfo [ ] submoduleMembers ( String submoduleName , int level ) { if ( submoduleName == null ) return listLevelData ( level ) ; ArrayList returnData = new ArrayList ( ) ; boolean inCategory = false ; if ( submoduleName . startsWith ( "ejb." ) ) inCategory = true ; Iterator allData = perfData . values ( ) ....
Returns an array of PmiDataInfo for the given submoduleName and level .
160,648
public PmiDataInfo [ ] listLevelData ( int level ) { ArrayList levelData = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getLevel ( ) <= level ) { levelData . add ( dataInfo ) ; ...
Returns the statistic with level equal to or lower than level
160,649
public PmiDataInfo [ ] listMyLevelData ( int level ) { ArrayList levelData = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getLevel ( ) == level ) { levelData . add ( dataInfo ) ...
Returns the statistic with level equal to level
160,650
public int [ ] listStatisticsWithDependents ( ) { if ( dependList == null ) { ArrayList list = new ArrayList ( ) ; Iterator allData = perfData . values ( ) . iterator ( ) ; while ( allData . hasNext ( ) ) { PmiDataInfo dataInfo = ( PmiDataInfo ) allData . next ( ) ; if ( dataInfo . getDependency ( ) != null ) { list . ...
Returns String representation of this object
160,651
private void scheduleEvictionTask ( long timeoutInMilliSeconds ) { EvictionTask evictionTask = new EvictionTask ( ) ; SwapTCCLAction swapTCCL = new SwapTCCLAction ( ) ; AccessController . doPrivileged ( swapTCCL ) ; try { timer = new Timer ( true ) ; long period = timeoutInMilliSeconds / 3 ; long delay = period ; timer...
Creates a timer and schedules the eviction task based on the timeout in milliseconds
160,652
public synchronized Object update ( String key , Object value ) { while ( isEvictionRequired ( ) && entryLimit > 0 && entryLimit < Integer . MAX_VALUE ) { evictStaleEntries ( ) ; } CacheEntry oldEntry = null ; CacheEntry curEntry = new CacheEntry ( value ) ; if ( primaryTable . containsKey ( key ) ) { oldEntry = ( Cach...
Update the value into the Cache using the specified key but do not change the table level of the cache . If the key is not in any table add it to the primaryTable
160,653
public synchronized void clearAllEntries ( ) { tertiaryTable . putAll ( primaryTable ) ; tertiaryTable . putAll ( secondaryTable ) ; primaryTable . clear ( ) ; secondaryTable . clear ( ) ; evictStaleEntries ( ) ; }
Purge all entries from the Cache . Semantically this should behave the same as the expiration of all entries from the cache .
160,654
public static WebSphereBeanDeploymentArchive createBDA ( WebSphereCDIDeployment deployment , ExtensionArchive extensionArchive , CDIRuntime cdiRuntime ) throws CDIException { Set < String > additionalClasses = extensionArchive . getExtraClasses ( ) ; Set < String > additionalAnnotations = extensionArchive . getExtraBea...
only for extensions
160,655
public void setWrapperCacheSize ( int cacheSize ) { wrapperCache . setCachePreferredMaxSize ( cacheSize ) ; int updatedCacheSize = getBeanIdCacheSize ( cacheSize ) ; beanIdCache . setSize ( updatedCacheSize ) ; }
Call to update the BeanIdCache cache size .
160,656
private int getBeanIdCacheSize ( int cacheSize ) { int beanIdCacheSize = cacheSize ; if ( beanIdCacheSize < ( Integer . MAX_VALUE / 2 ) ) beanIdCacheSize = beanIdCacheSize * 2 ; else beanIdCacheSize = Integer . MAX_VALUE ; return beanIdCacheSize ; }
Calculate the size to be used for the BeanIdCache .
160,657
public boolean unregister ( BeanId beanId , boolean dropRef ) throws CSIException { boolean removed = false ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregister" , new Object [ ] { beanId , new Boolean ( dropRef ) } ) ; ByteArray wrapperKey = beanId . getByteArray (...
d181569 - changed signature of method .
160,658
public void unregisterHome ( J2EEName homeName , EJSHome homeObj ) throws CSIException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "unregisterHome" ) ; J2EEName cacheHomeName ; int numEnumerated = 0 , numRemoved = 0 ; Enumeration < ? > enumerate = wrapperCache . enumer...
unregisterHome removes from cache homeObj and all Objects that have homeObj as it s home . It also unregisters these objects from from the orb object adapter .
160,659
public void discardObject ( EJBCache wrapperCache , Object key , Object ele ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "discardObject" , new Object [ ] { key , ele } ) ; EJSWrapperCommon wrapperCommon = ( EJSWrapperCommon ) ele ; wrapperCommon . disconnect ( ) ; if ...
Unregister a wrapper instance when it is castout of the wrapper cache .
160,660
public Object faultOnKey ( EJBCache cache , Object key ) throws FaultException { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) Tr . entry ( tc , "faultOnKey" , key ) ; ByteArray wrapperKey = ( ByteArray ) key ; EJSWrapperCommon result = null ; BeanId beanId = wrapperKey . getBeanId ( ) ; tr...
Invoked by the Cache FaultStrategy when an object was not found and needs to be inserted . We create a new wrapper instance to be inserted into the cache . The cache package holds the lock on a bucket when this method is invoked .
160,661
public boolean isValid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Checking validity of token " + this . getClass ( ) . getName ( ) ) ; if ( token != null ) { long currentTime = System . currentTimeMillis ( ) ; long expiration = getExpiration ( ) ; long timeleft =...
Validates the token including expiration signature etc .
160,662
public String getPrincipal ( ) { String [ ] accessIDArray = getAttributes ( "u" ) ; if ( accessIDArray != null && accessIDArray . length > 0 ) return accessIDArray [ 0 ] ; else return null ; }
Gets the principal that this Token belongs to . If this is an authorization token this principal string must match the authentication token principal string or the message will be rejected .
160,663
public String getUniqueID ( ) { String [ ] cacheKeyArray = getAttributes ( AttributeNameConstants . WSCREDENTIAL_CACHE_KEY ) ; if ( cacheKeyArray != null && cacheKeyArray [ 0 ] != null ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Tr . debug ( tc , "Found cache key in Authz token: " + c...
Returns a unique identifier of the token based upon information the provider considers makes this a unique token . This will be used for caching purposes and may be used in combination with other token unique IDs that are part of the same Subject .
160,664
public String [ ] getAttributes ( String key ) { if ( token != null ) return token . getAttributes ( key ) ; else return null ; }
Gets the attribute value based on the named value .
160,665
public long getMaximumTimeInStore ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMaximumTimeInStore" ) ; long maxTime = getMessageItem ( ) . getMaximumTimeInStore ( ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . exit ( tc...
Return the maximum time this reference should spend in a ReferenceStream .
160,666
private void resetEvents ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "resetEvents" ) ; PRE_COMMIT_ADD = null ; PRE_COMMIT_REMOVE = null ; POST_COMMIT_ADD_1 = null ; POST_COMMIT_ADD_2 = null ; POST_COMMIT_REMOVE_1 = null ; POST_COMMIT_REMOVE_2 = null ; POST_COMMI...
Reset all callbacks to null .
160,667
public SIBUuid12 getProducerConnectionUuid ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) { SibTr . entry ( tc , "getProducerConnectionUuid" ) ; SibTr . exit ( tc , "getProducerConnectionUuid" ) ; } return getMessageItem ( ) . getProducerConnectionUuid ( ) ; }
Returns the producerConnectionUuid .
160,668
private MessageItem getMessageItem ( ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( tc , "getMessageItem" ) ; MessageItem msg = null ; try { msg = ( MessageItem ) getReferredItem ( ) ; } catch ( MessageStoreException e ) { FFDCFilter . processException ( e , "com.ibm.ws.s...
Returns the referenced message item
160,669
public static void setTextInfoTranslationEnabled ( boolean textInfoTranslationEnabled , Locale locale ) { com . ibm . ws . pmi . stat . StatsImpl . setEnableNLS ( textInfoTranslationEnabled , locale ) ; }
This method allows translation of the textual information . By default translation is enabled using the default Locale .
160,670
private final static void ELCheckType ( final Object obj , final Class < ? > type ) throws ELException { if ( String . class . equals ( type ) ) { ELSupport . coerceToString ( obj ) ; } if ( ELArithmetic . isNumberType ( type ) ) { ELSupport . coerceToNumber ( obj , type ) ; } if ( Character . class . equals ( type ) |...
method used to replace ELSupport . checkType
160,671
public static String getProductVersion ( RepositoryResource installResource ) { String resourceVersion = null ; try { Collection < ProductDefinition > pdList = new ArrayList < ProductDefinition > ( ) ; for ( ProductInfo pi : ProductInfo . getAllProductInfo ( ) . values ( ) ) { pdList . add ( new ProductInfoProductDefin...
Gets the version of the resource using the getAppliesToVersions function .
160,672
public static boolean isPublicAsset ( ResourceType resourceType , RepositoryResource installResource ) { if ( resourceType . equals ( ResourceType . FEATURE ) || resourceType . equals ( ResourceType . ADDON ) ) { EsaResource esar = ( ( EsaResource ) installResource ) ; if ( esar . getVisibility ( ) . equals ( Visibilit...
Checks if Feature or Addon has visibility public or install OR checks if the resource is a Product sample or open source to see if it is a public asset .
160,673
public static Map < String , Collection < String > > writeResourcesToDiskRepo ( Map < String , Collection < String > > downloaded , File toDir , Map < String , List < List < RepositoryResource > > > installResources , String productVersion , EventManager eventManager , boolean defaultRepo ) throws InstallException { in...
The function writes the resources to the downloaded disk repo
160,674
@ Reference ( cardinality = ReferenceCardinality . MULTIPLE ) protected void setJaasLoginModuleConfig ( JAASLoginModuleConfig lmc , Map < String , Object > props ) { String pid = ( String ) props . get ( KEY_SERVICE_PID ) ; loginModuleMap . put ( pid , lmc ) ; }
SINCE THIS IS A STATIC REFERENCE DS provides enough synchronization so that we don t need to synchronize on the map .
160,675
public void init ( HttpInboundServiceContext context ) { this . message = context . getRequest ( ) ; if ( this . useEE7Streams ) { this . body = new HttpInputStreamEE7 ( context ) ; } else { this . body = new HttpInputStreamImpl ( context ) ; } }
Initialize with a new connection .
160,676
public static Metadata < Extension > loadExtension ( String extensionClass , ClassLoader classloader ) { Class < ? extends Extension > serviceClass = loadClass ( Extension . class , extensionClass , classloader ) ; if ( serviceClass == null ) { return null ; } Extension serviceInstance = prepareInstance ( serviceClass ...
Create the extension and return a metadata for the extension
160,677
public static < S > Class < ? extends S > loadClass ( Class < S > expectedType , String serviceClassName , ClassLoader classloader ) { Class < ? > clazz = null ; Class < ? extends S > serviceClass = null ; try { clazz = classloader . loadClass ( serviceClassName ) ; serviceClass = clazz . asSubclass ( expectedType ) ; ...
load the class and then casts to the specified sub class
160,678
public static < S > S prepareInstance ( Class < ? extends S > serviceClass ) { try { final Constructor < ? extends S > constructor = serviceClass . getDeclaredConstructor ( ) ; AccessController . doPrivileged ( new PrivilegedAction < Void > ( ) { public Void run ( ) { constructor . setAccessible ( true ) ; return null ...
Creates an object of the service class
160,679
private static boolean isVisible ( ClassLoader loaderA , ClassLoader loaderB ) { if ( loaderB == loaderA || loaderB . getParent ( ) == loaderA ) { return true ; } return false ; }
return true if loaderA is visible to loaderB
160,680
public static ClassLoader getAndSetLoader ( ClassLoader newCL ) { ThreadContextAccessor tca = ThreadContextAccessor . getThreadContextAccessor ( ) ; Object maybeOldCL = tca . pushContextClassLoaderForUnprivileged ( newCL ) ; if ( maybeOldCL instanceof ClassLoader ) { return ( ClassLoader ) maybeOldCL ; } else { return ...
This method sets the thread context classloader and returns whatever was the TCCL before it was updated .
160,681
public static boolean isWeldProxy ( Object obj ) { Class < ? > clazz = obj . getClass ( ) ; boolean result = isWeldProxy ( clazz ) ; return result ; }
Return whether the object is a weld proxy
160,682
public < T > void aroundInject ( final InjectionContext < T > injectionContext ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "Annotations: " + injectionContext . getAnnotatedType ( ) ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { T...
Perform Injection . For EE
160,683
public void readSet ( int requestNumber , SIMessageHandle [ ] msgHandles ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readSet" , new Object [ ] { requestNumber , msgHandles } ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) Sib...
This method will return a set of messages currently locked by the messaging engine .
160,684
public void readAndDeleteSet ( int requestNumber , SIMessageHandle [ ] msgHandles , int tran ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) SibTr . entry ( this , tc , "readAndDeleteSet" , new Object [ ] { requestNumber , msgHandles , tran } ) ; if ( TraceComponent . isAnyTracingEnabled ...
This method will return and delete a set of messages currently locked by the messaging engine .
160,685
public String getCodeSource ( ProtectionDomain pd ) { CodeSource cs = pd . getCodeSource ( ) ; String csStr = null ; if ( cs == null ) { csStr = "null code source" ; } else { URL url = cs . getLocation ( ) ; if ( url == null ) { csStr = "null code URL" ; } else { csStr = url . toString ( ) ; } } return csStr ; }
Find the code source based on the protection domain
160,686
public String permissionToString ( java . security . CodeSource cs , ClassLoader classloaderClass , PermissionCollection col ) { StringBuffer buf = new StringBuffer ( "ClassLoader: " ) ; if ( classloaderClass == null ) { buf . append ( "Primordial Classloader" ) ; } else { buf . append ( classloaderClass . getClass ( )...
Print out permissions granted to a CodeSource .
160,687
boolean isOffendingClass ( Class < ? > [ ] classes , int j , ProtectionDomain pd2 , Permission inPerm ) { return ( ! classes [ j ] . getName ( ) . startsWith ( "java" ) ) && ( classes [ j ] . getName ( ) . indexOf ( "com.ibm.ws.kernel.launch.internal.NoRethrowSecurityManager" ) == - 1 ) && ( classes [ j ] . getName ( )...
isOffendingClass determines the offending class from the classes defined in the stack .
160,688
protected void cleanup ( ) { final String methodName = "cleanup" ; if ( TRACE . isEntryEnabled ( ) ) { SibTr . entry ( this , TRACE , methodName ) ; } super . cleanup ( ) ; if ( _successfulMessages . size ( ) > 0 ) { try { deleteMessages ( getMessageHandles ( _successfulMessages ) , null ) ; } catch ( final ResourceExc...
Invoked after all messages in the batch have been delivered . Deletes any successful messages .
160,689
public String getContextName ( ) { ExternalContext ctx = _MyFacesExternalContextHelper . firstInstance . get ( ) ; if ( ctx == null ) { throw new UnsupportedOperationException ( ) ; } return ctx . getContextName ( ) ; }
Returns the name of the underlying context
160,690
public boolean addTransformer ( final ClassFileTransformer cft ) { transformers . add ( cft ) ; if ( parent instanceof AppClassLoader ) { if ( Util . isGlobalSharedLibraryLoader ( ( ( AppClassLoader ) parent ) ) ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { Tr . debug ( tc , "addTrans...
Spring method to register the given ClassFileTransformer on this ClassLoader
160,691
public Bundle getBundle ( ) { return parent instanceof GatewayClassLoader ? ( ( GatewayClassLoader ) parent ) . getBundle ( ) : parent instanceof LibertyLoader ? ( ( LibertyLoader ) parent ) . getBundle ( ) : null ; }
Returns the Bundle of the Top Level class loader
160,692
@ FFDCIgnore ( value = { IllegalArgumentException . class } ) private void definePackage ( ByteResourceInformation byteResourceInformation , String packageName ) { Manifest manifest = byteResourceInformation . getManifest ( ) ; try { if ( manifest == null ) { definePackage ( packageName , null , null , null , null , nu...
This method will define the package using the byteResourceInformation for a class to get the URL for this package to try to load a manifest . If a manifest can t be loaded from the URL it will create the package with no package versioning or sealing information .
160,693
@ FFDCIgnore ( ClassNotFoundException . class ) private Class < ? > findClassCommonLibraryClassLoaders ( String name ) throws ClassNotFoundException { for ( LibertyLoader cl : delegateLoaders ) { try { return cl . findClass ( name ) ; } catch ( ClassNotFoundException e ) { } } throw new ClassNotFoundException ( name ) ...
Search for the class using the common library classloaders .
160,694
private URL findResourceCommonLibraryClassLoaders ( String name ) { for ( LibertyLoader cl : delegateLoaders ) { URL url = cl . findResource ( name ) ; if ( url != null ) { return url ; } } return null ; }
Search for the resource using the common library classloaders .
160,695
private CompositeEnumeration < URL > findResourcesCommonLibraryClassLoaders ( String name , CompositeEnumeration < URL > enumerations ) throws IOException { for ( LibertyLoader cl : delegateLoaders ) { enumerations . add ( cl . findResources ( name ) ) ; } return enumerations ; }
Search for the resources using the common library classloaders .
160,696
private void copyLibraryElementsToClasspath ( Library library ) { Collection < File > files = library . getFiles ( ) ; addToClassPath ( library . getContainers ( ) ) ; if ( files != null && ! ! ! files . isEmpty ( ) ) { for ( File file : files ) { nativeLibraryFiles . add ( file ) ; } } for ( Fileset fileset : library ...
Takes the Files and Folders from the Library and adds them to the various classloader classpaths
160,697
private static boolean checkLib ( final File f , String basename ) { boolean fExists = System . getSecurityManager ( ) == null ? f . exists ( ) : AccessController . doPrivileged ( new PrivilegedAction < Boolean > ( ) { public Boolean run ( ) { return f . exists ( ) ; } } ) ; return fExists && ( f . getName ( ) . equals...
Check if the given file s name matches the given library basename .
160,698
public static void removeCompositeComponentForResolver ( FacesContext facesContext ) { List < UIComponent > list = ( List < UIComponent > ) facesContext . getAttributes ( ) . get ( CURRENT_COMPOSITE_COMPONENT_KEY ) ; if ( list != null ) { list . remove ( list . size ( ) - 1 ) ; } }
Removes the composite component from the attribute map of the FacesContext .
160,699
public void processHttpChainWork ( boolean enableEndpoint , boolean isPause ) { if ( enableEndpoint ) { endpointState . compareAndSet ( DISABLED , ENABLED ) ; if ( httpPort >= 0 ) { httpChain . enable ( ) ; } if ( httpsPort >= 0 && sslFactoryProvider . getService ( ) != null ) { httpSecureChain . enable ( ) ; } if ( ! ...
Process HTTP chain work .