idx int64 0 165k | question stringlengths 73 5.81k | target stringlengths 5 918 |
|---|---|---|
14,700 | public Sight getSight ( long sightId , Integer level ) throws SmartsheetException { String path = "sights/" + sightId ; HashMap < String , Object > parameters = new HashMap < String , Object > ( ) ; if ( level != null ) { parameters . put ( "level" , level ) ; } path += QueryUtil . generateUrl ( null , parameters ) ; r... | Get a specified Sight . |
14,701 | public Sight updateSight ( Sight sight ) throws SmartsheetException { Util . throwIfNull ( sight ) ; return this . updateResource ( "sights/" + sight . getId ( ) , Sight . class , sight ) ; } | Update a specified Sight . |
14,702 | public SightPublish setPublishStatus ( long sightId , SightPublish sightPublish ) throws SmartsheetException { Util . throwIfNull ( sightPublish ) ; return this . updateResource ( "sights/" + sightId + "/publish" , SightPublish . class , sightPublish ) ; } | Sets the publish status of a Sight and returns the new status including the URLs of any enabled publishing . |
14,703 | public PagedResult < Template > listUserCreatedTemplates ( PaginationParameters parameters ) throws SmartsheetException { String path = "templates" ; if ( parameters != null ) { path += parameters . toQueryString ( ) ; } return this . listResourcesWithWrapper ( path , Template . class ) ; } | List user - created templates . |
14,704 | public Folder getFolder ( long folderId , EnumSet < SourceInclusion > includes ) throws SmartsheetException { String path = "folders/" + folderId ; HashMap < String , Object > parameters = new HashMap < String , Object > ( ) ; parameters . put ( "include" , QueryUtil . generateCommaSeparatedList ( includes ) ) ; path +... | Get a folder . |
14,705 | public Folder updateFolder ( Folder folder ) throws SmartsheetException { return this . updateResource ( "folders/" + folder . getId ( ) , Folder . class , folder ) ; } | Update a folder . |
14,706 | public PagedResult < Folder > listFolders ( long parentFolderId , PaginationParameters parameters ) throws SmartsheetException { String path = "folders/" + parentFolderId + "/folders" ; if ( parameters != null ) { path += parameters . toQueryString ( ) ; } return this . listResourcesWithWrapper ( path , Folder . class ... | List child folders of a given folder . |
14,707 | public Folder createFolder ( long parentFolderId , Folder folder ) throws SmartsheetException { return this . createResource ( "folders/" + parentFolderId + "/folders" , Folder . class , folder ) ; } | Create a folder . |
14,708 | public Folder moveFolder ( long folderId , ContainerDestination containerDestination ) throws SmartsheetException { String path = "folders/" + folderId + "/move" ; return this . createResource ( path , Folder . class , containerDestination ) ; } | Moves the specified Folder to another location . |
14,709 | public SearchResult searchSheet ( long sheetId , String query ) throws SmartsheetException { Util . throwIfNull ( query ) ; Util . throwIfEmpty ( query ) ; try { return this . getResource ( "search/sheets/" + sheetId + "?query=" + URLEncoder . encode ( query , "utf-8" ) , SearchResult . class ) ; } catch ( UnsupportedE... | Performs a search within a sheet . |
14,710 | public Attachment attachUrl ( long sheetId , Attachment attachment ) throws SmartsheetException { return this . createResource ( "sheets/" + sheetId + "/attachments" , Attachment . class , attachment ) ; } | Attach a URL to a sheet . |
14,711 | public PagedResult < Attachment > listAttachments ( long sheetId , PaginationParameters parameters ) throws SmartsheetException { String path = "sheets/" + sheetId + "/attachments" ; if ( parameters != null ) { path += parameters . toQueryString ( ) ; } return this . listResourcesWithWrapper ( path , Attachment . class... | Gets a list of all Attachments that are on the Sheet including Sheet Row and Discussion level Attachments . |
14,712 | public OAuthFlow build ( ) { if ( httpClient == null ) { httpClient = new DefaultHttpClient ( ) ; } if ( tokenURL == null ) { tokenURL = DEFAULT_TOKEN_URL ; } if ( authorizationURL == null ) { authorizationURL = DEFAULT_AUTHORIZATION_URL ; } if ( jsonSerializer == null ) { jsonSerializer = new JacksonJsonSerializer ( )... | Build the OAuthFlow instance . |
14,713 | public Folder createFolder ( long workspaceId , Folder folder ) throws SmartsheetException { return this . createResource ( "workspaces/" + workspaceId + "/folders" , Folder . class , folder ) ; } | Create a folder in the workspace . |
14,714 | public List < Favorite > addFavorites ( List < Favorite > favorites ) throws SmartsheetException { return this . postAndReceiveList ( "favorites/" , favorites , Favorite . class ) ; } | Adds one or more items to the user s list of Favorite items . |
14,715 | public PagedResult < Favorite > listFavorites ( PaginationParameters parameters ) throws SmartsheetException { String path = "favorites" ; if ( parameters != null ) { path += parameters . toQueryString ( ) ; } return this . listResourcesWithWrapper ( path , Favorite . class ) ; } | Gets a list of all of the user s Favorite items . |
14,716 | public static < T > String generateCommaSeparatedList ( Collection < T > list ) { if ( list == null || list . size ( ) == 0 ) { return "" ; } StringBuilder result = new StringBuilder ( ) ; for ( Object obj : list ) { result . append ( ',' ) . append ( obj . toString ( ) ) ; } return result . length ( ) == 0 ? "" : resu... | Returns a comma seperated list of items as a string |
14,717 | protected static String generateQueryString ( Map < String , Object > parameters ) { if ( parameters == null || parameters . size ( ) == 0 ) { return "" ; } StringBuilder result = new StringBuilder ( ) ; try { for ( Map . Entry < String , Object > entry : parameters . entrySet ( ) ) { if ( entry . getKey ( ) != null &&... | Returns a query string . |
14,718 | public static Message errorMessage ( String detailMessage ) { Message message = new Message ( ) ; message . setDetailMessage ( detailMessage ) ; message . setSeverity ( "ERROR" ) ; message . setType ( "" ) ; return message ; } | Returns a Message with Severity set to ERROR and the detailMessage set to what is passed in . |
14,719 | public void handleJsonArrayToJavaString ( String name , Object value ) { try { PropertyUtils . setProperty ( this , name , this . convertListToString ( value ) ) ; } catch ( IllegalAccessException e ) { log . debug ( "Error setting field " + name + " with value " + value + " on entity " + this . getClass ( ) . getSimpl... | Unknown properties are handled here . One main purpose of this method is to handle String values that are sent as json arrays if configured as multi - values in bh . |
14,720 | public String convertListToString ( Object listOrString ) { if ( listOrString == null ) { return null ; } if ( listOrString instanceof Collection ) { List < String > list = ( List < String > ) listOrString ; return StringUtils . join ( list , "," ) ; } return listOrString . toString ( ) ; } | Handles the fact that bh rest api sends Strings as json arrays if they are setup as multipickers in the fieldmaps . |
14,721 | private ObjectMapper createObjectMapper ( ) { ObjectMapper mapper = new ObjectMapper ( ) ; mapper . registerModule ( new JodaModule ( ) ) ; mapper . configure ( SerializationFeature . INDENT_OUTPUT , true ) ; return mapper ; } | Create the ObjectMapper that deserializes entity to json String . |
14,722 | public < T > T jsonToEntityUnwrapRoot ( String jsonString , Class < T > type ) { return jsonToEntity ( jsonString , type , this . objectMapperWrapped ) ; } | Converts a jsonString to an object of type T . Unwraps from root most often this means that the data tag is ignored and that the entity is created from within that data tag . |
14,723 | public < T extends BullhornEntity > String convertEntityToJsonString ( T entity ) { String jsonString = "" ; try { jsonString = objectMapperStandard . writeValueAsString ( entity ) ; } catch ( JsonProcessingException e ) { log . error ( "Error deserializing entity of type" + entity . getClass ( ) + " to jsonString." , ... | Takes a BullhornEntity and converts it to a String in json format . |
14,724 | public Map < String , String > getUriVariablesForEntity ( BullhornEntityInfo entityInfo , Integer id , Set < String > fieldSet , EntityParams params ) { if ( params == null ) { params = ParamFactory . entityParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables... | Returns the uri variables needed for an entity GET |
14,725 | public Map < String , String > getUriVariablesForEntityDelete ( BullhornEntityInfo entityInfo , Integer id ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; addModifyingUriVariables ( uriVariables , entityInfo ) ; uriVariables . put ( ID , id . toString ( ) ) ; return uriVariables ;... | Returns the uri variables needed for an entity DELETE |
14,726 | public Map < String , String > getUriVariablesForEntityInsert ( BullhornEntityInfo entityInfo ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; addModifyingUriVariables ( uriVariables , entityInfo ) ; return uriVariables ; } | Returns the uri variables needed for the entity PUT request . |
14,727 | public Map < String , String > getUriVariablesForQueryWithPost ( BullhornEntityInfo entityInfo , Set < String > fieldSet , QueryParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; return uriVariables ; } | Returns the uri variables needed for a query request minus where since that will be in the body |
14,728 | public Map < String , String > getUriVariablesForQuery ( BullhornEntityInfo entityInfo , String where , Set < String > fieldSet , QueryParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; uriVariables . put ( WHER... | Returns the uri variables needed for a query request |
14,729 | public Map < String , String > getUriVariablesForSearchWithPost ( BullhornEntityInfo entityInfo , Set < String > fieldSet , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; return uriVariables ; } | Returns the uri variables needed for a search request minus query |
14,730 | public Map < String , String > getUriVariablesForSearch ( BullhornEntityInfo entityInfo , String query , Set < String > fieldSet , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; this . addCommonUriVariables ( fieldSet , entityInfo , uriVariables ) ; uriVariables . put ( QU... | Returns the uri variables needed for a search request |
14,731 | public Map < String , String > getUriVariablesForIdSearch ( BullhornEntityInfo entityInfo , String query , SearchParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; uriVariables . put ( BH_REST_TOKEN , bullhornApiRest . getBhRestToken ( ) ) ; uriVariables . put ( ENTITY_TYPE , entity... | Returns the uri variables needed for a id search request |
14,732 | public Map < String , String > getUriVariablesForResumeFileParse ( ResumeFileParseParams params , MultipartFile resume ) { if ( params == null ) { params = ParamFactory . resumeFileParseParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRest . getBhRestT... | Returns the uri variables needed for a resume file request |
14,733 | public Map < String , String > getUriVariablesForResumeTextParse ( ResumeTextParseParams params ) { if ( params == null ) { params = ParamFactory . resumeTextParseParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables... | Returns the uri variables needed for a resume text request |
14,734 | public Map < String , String > getUriVariablesForGetFile ( BullhornEntityInfo entityInfo , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = new LinkedHashMap < String , String > ( ) ; String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables . put ( BH_REST_TOKEN , bhRestToken... | Returns the uri variables needed for a get file request |
14,735 | public Map < String , String > getUriVariablesForCorpNotes ( Integer clientCorporationID , Set < String > fieldSet , CorpNotesParams params ) { if ( params == null ) { params = ParamFactory . corpNotesParams ( ) ; } Map < String , String > uriVariables = params . getParameterMap ( ) ; String bhRestToken = bullhornApiRe... | Returns the uri variables needed for a get corp notes call |
14,736 | private void addModifyingUriVariables ( Map < String , String > uriVariables , BullhornEntityInfo entityInfo ) { String bhRestToken = bullhornApiRest . getBhRestToken ( ) ; uriVariables . put ( BH_REST_TOKEN , bhRestToken ) ; uriVariables . put ( ENTITY_TYPE , entityInfo . getName ( ) ) ; uriVariables . put ( EXECUTE_F... | Adds common URI Variables for calls that are creating updating or deleting data . |
14,737 | public Map < String , String > getUriVariablesForFastFind ( String query , FastFindParams params ) { Map < String , String > uriVariables = params . getParameterMap ( ) ; uriVariables . put ( BH_REST_TOKEN , bullhornApiRest . getBhRestToken ( ) ) ; uriVariables . put ( QUERY , query ) ; return uriVariables ; } | Returns the uri variables needed for a fastFind request |
14,738 | protected < C extends CrudResponse , T extends UpdateEntity > List < C > handleMultipleUpdates ( List < T > entityList ) { if ( entityList == null || entityList . isEmpty ( ) ) { return Collections . emptyList ( ) ; } List < EntityUpdateWorker < C > > taskList = new ArrayList < EntityUpdateWorker < C > > ( ) ; for ( T ... | Spins off threads that will call handleUpdateEntity for each entity . |
14,739 | protected < P extends ParsedResume > P handleParseResumeText ( String resume , ResumeTextParseParams params ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForResumeTextParse ( params ) ; String url = restUrlFactory . assembleParseResumeTextUrl ( params ) ; JSONObject resumeInfoToPos... | Handles the parsing of a resume text . Contains retry logic . |
14,740 | protected ParsedResume parseResume ( String url , Object requestPayLoad , Map < String , String > uriVariables ) { ParsedResume response = null ; for ( int tryNumber = 1 ; tryNumber <= RESUME_PARSE_RETRY ; tryNumber ++ ) { try { response = this . performPostResumeRequest ( url , requestPayLoad , uriVariables ) ; break ... | Makes the call to the resume parser . If parse fails this method will retry RESUME_PARSE_RETRY number of times . |
14,741 | protected List < FileWrapper > handleGetAllFileContentWithMetaData ( Class < ? extends FileEntity > type , Integer entityId ) { List < FileMeta > metaDataList = this . handleGetEntityMetaFiles ( type , entityId ) ; ExecutorService executor = Executors . newFixedThreadPool ( Runtime . getRuntime ( ) . availableProcessor... | This method will get all the meta data and then handle the fetching of FileContent in a multi - threaded fashion . |
14,742 | protected FileWrapper handleGetFileContentWithMetaData ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { FileWrapper fileWrapper = null ; try { FileContent fileContent = this . handleGetFileContent ( type , entityId , fileId ) ; List < FileMeta > metaDataList = this . handleGetEntityMetaFile... | Makes the api call to get both the file content and filemeta data and combines those two to a FileWrapper |
14,743 | protected List < FileMeta > handleGetEntityMetaFiles ( Class < ? extends FileEntity > type , Integer entityId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForGetEntityMetaFiles ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId ) ; String url = restUrlFactory . asse... | Makes the api call to get the FileMeta data for an entity |
14,744 | protected FileContent handleGetFileContent ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesForGetFile ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId , fileId ) ; String url = restUrlFactory .... | Makes the api call to get the file content |
14,745 | protected FileWrapper handleAddFileWithMultipartFile ( Class < ? extends FileEntity > type , Integer entityId , MultipartFile multipartFile , String externalId , FileParams params , boolean deleteFile ) { MultiValueMap < String , Object > multiValueMap = null ; try { multiValueMap = restFileManager . addFileToMultiValu... | Makes the api call to add files to an entity . Takes a MultipartFile . |
14,746 | protected FileWrapper handleAddFileAndUpdateCandidateDescription ( Integer candidateId , File file , String candidateDescription , String externalId , FileParams params , boolean deleteFile ) { FileWrapper fileWrapper = this . handleAddFileWithFile ( Candidate . class , candidateId , file , externalId , params , delete... | Handles logic to add the file to the candidate entity AND updating the candidate . description with the resume text . |
14,747 | protected < P extends ParsedResume > P addFileThenHandleParseResume ( Class < ? extends FileEntity > type , Integer entityId , MultipartFile multipartFile , String externalId , FileParams fileParams , ResumeFileParseParams params ) { FileWrapper fileWrapper = handleAddFileWithMultipartFile ( type , entityId , multipart... | Makes the api call to both parse the resume and then attach the file . File is only attached if the resume parse was successful . |
14,748 | protected FileApiResponse handleDeleteFile ( Class < ? extends FileEntity > type , Integer entityId , Integer fileId ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesDeleteFile ( BullhornEntityInfo . getTypesRestEntityName ( type ) , entityId , fileId ) ; String url = restUrlFactory .... | Makes the api call to delete a file attached to an entity . |
14,749 | protected < C extends CrudResponse , T extends AssociationEntity > C handleAssociateWithEntity ( Class < T > type , Integer entityId , AssociationField < T , ? extends BullhornEntity > associationName , Set < Integer > associationIds ) { Map < String , String > uriVariables = restUriVariablesFactory . getUriVariablesFo... | Makes the api call to create associations . |
14,750 | public < T extends BullhornEntity > CrudResponse handleHttpFourAndFiveHundredErrors ( CrudResponse response , HttpStatusCodeException error , Integer id ) { response . setChangedEntityId ( id ) ; Message message = new Message ( ) ; message . setDetailMessage ( error . getResponseBodyAsString ( ) ) ; message . setSeveri... | Updates the passed in CrudResponse with the HttpStatusCodeException thrown by the RestTemplate . |
14,751 | private void displayMBeans ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { Iterator mbeans ; try { mbeans = getDomainData ( ) ; } catch ( Exception e ) { throw new ServletException ( "Failed to get MBeans" , e ) ; } request . setAttribute ( "mbeans" , mbeans ) ; Req... | Display all MBeans |
14,752 | private void inspectMBean ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "inspectMBean, name=" + name ) ; try { MBeanData data = getMBeanData ( name ) ; request . setAttribute ( "mbeanData... | Display a MBeans attributes and operations |
14,753 | private void updateAttributes ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "updateAttributes, name=" + name ) ; Enumeration paramNames = request . getParameterNames ( ) ; HashMap < Strin... | Update the writable attributes of a MBean |
14,754 | private void invokeOpByName ( HttpServletRequest request , HttpServletResponse response ) throws ServletException , IOException { String name = request . getParameter ( "name" ) ; if ( trace ) log . trace ( "invokeOpByName, name=" + name ) ; String [ ] argTypes = request . getParameterValues ( "argType" ) ; String [ ] ... | Invoke a MBean operation given the method name and its signature . |
14,755 | private MBeanData getMBeanData ( final String name ) throws PrivilegedActionException { return AccessController . doPrivileged ( new PrivilegedExceptionAction < MBeanData > ( ) { public MBeanData run ( ) throws Exception { return Server . getMBeanData ( name ) ; } } ) ; } | Get the MBean data for a bean |
14,756 | @ SuppressWarnings ( { "unchecked" } ) private AttributeList setAttributes ( final String name , final HashMap attributes ) throws PrivilegedActionException { return AccessController . doPrivileged ( new PrivilegedExceptionAction < AttributeList > ( ) { public AttributeList run ( ) throws Exception { return Server . se... | Set attributes on a MBean |
14,757 | private void writeTransaction ( Definition def , Writer out , int indent ) throws IOException { writeWithIndent ( out , indent , "/**\n" ) ; writeWithIndent ( out , indent , " * Returns an <code>javax.resource.spi.LocalTransaction</code> instance.\n" ) ; writeWithIndent ( out , indent , " *\n" ) ; writeWithIndent ( out... | Output Transaction method |
14,758 | private static Class < ? > [ ] getFields ( Class < ? > clz ) { List < Class < ? > > result = new ArrayList < Class < ? > > ( ) ; Class < ? > c = clz ; while ( ! c . equals ( Object . class ) ) { try { Field [ ] fields = SecurityActions . getDeclaredFields ( c ) ; if ( fields . length > 0 ) { for ( Field f : fields ) { ... | Get the classes for all the fields |
14,759 | public void execute ( Runnable job ) { try { executor . execute ( job ) ; } catch ( RejectedExecutionException e ) { log . warnf ( e , "Job rejected: %s" , job ) ; } } | Execute a job |
14,760 | public int getIdleThreads ( ) { if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getPoolSize ( ) - tpe . getActiveCount ( ) ; } return - 1 ; } | Get the number of idle threads |
14,761 | public boolean isLowOnThreads ( ) { if ( executor instanceof ThreadPoolExecutor ) { final ThreadPoolExecutor tpe = ( ThreadPoolExecutor ) executor ; return tpe . getActiveCount ( ) >= tpe . getMaximumPoolSize ( ) ; } return false ; } | Is the pool low on threads ? |
14,762 | public static Pool createPool ( String type , ConnectionManager cm , PoolConfiguration pc ) { if ( type == null || type . equals ( "" ) ) return new DefaultPool ( cm , pc ) ; type = type . toLowerCase ( Locale . US ) ; switch ( type ) { case "default" : return new DefaultPool ( cm , pc ) ; case "stable" : return new St... | Create a pool |
14,763 | static Set < PasswordCredential > getPasswordCredentials ( final Subject subject ) { if ( System . getSecurityManager ( ) == null ) return subject . getPrivateCredentials ( PasswordCredential . class ) ; return AccessController . doPrivileged ( new PrivilegedAction < Set < PasswordCredential > > ( ) { public Set < Pass... | Get the PasswordCredential from the Subject |
14,764 | static StackTraceElement [ ] getStackTrace ( final Thread t ) { if ( System . getSecurityManager ( ) == null ) return t . getStackTrace ( ) ; return AccessController . doPrivileged ( new PrivilegedAction < StackTraceElement [ ] > ( ) { public StackTraceElement [ ] run ( ) { return t . getStackTrace ( ) ; } } ) ; } | Get stack trace |
14,765 | public static void main ( String [ ] args ) { boolean quiet = false ; String outputDir = "." ; int arg = 0 ; String [ ] classpath = null ; if ( args . length > 0 ) { while ( args . length > arg + 1 ) { if ( args [ arg ] . startsWith ( "-" ) ) { if ( args [ arg ] . endsWith ( "quiet" ) ) { quiet = true ; } else if ( arg... | Validator standalone tool |
14,766 | protected LocalXAResource getLocalXAResource ( ManagedConnection mc ) throws ResourceException { TransactionalConnectionManager txCM = ( TransactionalConnectionManager ) cm ; LocalXAResource xaResource = null ; String eisProductName = null ; String eisProductVersion = null ; String jndiName = cm . getConnectionManagerC... | Get a LocalXAResource instance |
14,767 | protected XAResource getXAResource ( ManagedConnection mc ) throws ResourceException { TransactionalConnectionManager txCM = ( TransactionalConnectionManager ) cm ; XAResource xaResource = null ; if ( cm . getConnectionManagerConfiguration ( ) . isWrapXAResource ( ) ) { String eisProductName = null ; String eisProductV... | Get a XAResource instance |
14,768 | public void prefill ( ) { if ( isShutdown ( ) ) return ; if ( poolConfiguration . isPrefill ( ) ) { ManagedConnectionPool mcp = pools . get ( getPrefillCredential ( ) ) ; if ( mcp == null ) { getManagedConnectionPool ( getPrefillCredential ( ) ) ; } else { mcp . prefill ( ) ; } } } | Prefill the connection pool |
14,769 | public Credential getPrefillCredential ( ) { if ( this . prefillCredential == null ) { if ( cm . getSubjectFactory ( ) == null || cm . getConnectionManagerConfiguration ( ) . getSecurityDomain ( ) == null ) { prefillCredential = new Credential ( null , null ) ; } else { prefillCredential = new Credential ( SecurityActi... | Get prefill credential |
14,770 | protected boolean isRarArchive ( URL url ) { if ( url == null ) return false ; return isRarFile ( url ) || isRarDirectory ( url ) ; } | Does the URL represent a . rar archive |
14,771 | protected boolean isRarFile ( URL url ) { if ( url != null && url . toExternalForm ( ) . endsWith ( ".rar" ) && ! url . toExternalForm ( ) . startsWith ( "jar" ) ) return true ; return false ; } | Does the URL represent a . rar file |
14,772 | public Object getAnnotation ( ) { try { if ( isOnField ( ) ) { Class < ? > clazz = cl . loadClass ( className ) ; while ( ! clazz . equals ( Object . class ) ) { try { Field field = SecurityActions . getDeclaredField ( clazz , memberName ) ; return field . getAnnotation ( annotationClass ) ; } catch ( Throwable t ) { c... | Get the annotation . |
14,773 | public DataSources parse ( XMLStreamReader reader ) throws Exception { DataSources dataSources = null ; int iterate ; try { iterate = reader . nextTag ( ) ; } catch ( XMLStreamException e ) { iterate = reader . nextTag ( ) ; } switch ( iterate ) { case END_ELEMENT : { break ; } case START_ELEMENT : { switch ( reader . ... | Parse a - ds . xml file |
14,774 | public void store ( DataSources metadata , XMLStreamWriter writer ) throws Exception { if ( metadata != null && writer != null ) { writer . writeStartElement ( XML . ELEMENT_DATASOURCES ) ; if ( metadata . getDataSource ( ) != null && ! metadata . getDataSource ( ) . isEmpty ( ) ) { for ( DataSource ds : metadata . get... | Store a - ds . xml file |
14,775 | protected void storeDriver ( Driver drv , XMLStreamWriter writer ) throws Exception { writer . writeStartElement ( XML . ELEMENT_DRIVER ) ; if ( drv . getName ( ) != null ) writer . writeAttribute ( XML . ATTRIBUTE_NAME , drv . getValue ( XML . ATTRIBUTE_NAME , drv . getName ( ) ) ) ; if ( drv . getModule ( ) != null )... | Store a driver |
14,776 | public static ClassDefinition createClassDefinition ( Serializable s , Class < ? > clz ) { if ( s == null || clz == null ) return null ; String name = clz . getName ( ) ; long serialVersionUID = 0L ; byte [ ] data = null ; ByteArrayOutputStream baos = new ByteArrayOutputStream ( ) ; InputStream is = null ; try { try { ... | Create a class definition |
14,777 | private static Field getSerialVersionUID ( Class < ? > clz ) { Class < ? > c = clz ; while ( c != null ) { try { Field svuf = SecurityActions . getDeclaredField ( clz , "serialVersionUID" ) ; SecurityActions . setAccessible ( svuf ) ; return svuf ; } catch ( Throwable t ) { } c = c . getSuperclass ( ) ; } return null ;... | Find the serialVersionUID field |
14,778 | protected WorkManager parseWorkManager ( XMLStreamReader reader ) throws XMLStreamException , ParserException , ValidateException { WorkManagerSecurity security = null ; while ( reader . hasNext ( ) ) { switch ( reader . nextTag ( ) ) { case END_ELEMENT : { if ( CommonXML . ELEMENT_WORKMANAGER . equals ( reader . getLo... | Parse workmanager element |
14,779 | protected void storeAdminObject ( AdminObject ao , XMLStreamWriter writer ) throws Exception { writer . writeStartElement ( CommonXML . ELEMENT_ADMIN_OBJECT ) ; if ( ao . getClassName ( ) != null ) writer . writeAttribute ( CommonXML . ATTRIBUTE_CLASS_NAME , ao . getValue ( CommonXML . ATTRIBUTE_CLASS_NAME , ao . getCl... | Store admin object |
14,780 | public static AnnotationScanner getAnnotationScanner ( ) { if ( active != null ) return active ; if ( defaultImplementation == null ) throw new IllegalStateException ( bundle . noAnnotationScanner ( ) ) ; return defaultImplementation ; } | Get the annotation scanner |
14,781 | void writeConfigPropsDeclare ( Definition def , Writer out , int indent ) throws IOException { if ( getConfigProps ( def ) == null ) return ; for ( int i = 0 ; i < getConfigProps ( def ) . size ( ) ; i ++ ) { writeWithIndent ( out , indent , "/** " + getConfigProps ( def ) . get ( i ) . getName ( ) + " */\n" ) ; if ( d... | Output Configuration Properties Declare |
14,782 | void writeConfigProps ( Definition def , Writer out , int indent ) throws IOException { if ( getConfigProps ( def ) == null ) return ; for ( int i = 0 ; i < getConfigProps ( def ) . size ( ) ; i ++ ) { String name = getConfigProps ( def ) . get ( i ) . getName ( ) ; String upcaseName = upcaseFirst ( name ) ; writeWithI... | Output Configuration Properties |
14,783 | public synchronized Object verifyConnectionListener ( ConnectionListener cl ) throws ResourceException { for ( Map . Entry < Object , Map < ManagedConnectionPool , ConnectionListener > > entry : transactionMap . entrySet ( ) ) { if ( entry . getValue ( ) . values ( ) . contains ( cl ) ) { try { TransactionalConnectionM... | Verify if a connection listener is already in use |
14,784 | public static List < Failure > validateConfigPropertiesType ( ValidateClass vo , String section , String failMsg ) { List < Failure > failures = new ArrayList < Failure > ( 1 ) ; for ( ConfigProperty cpmd : vo . getConfigProperties ( ) ) { try { containGetOrIsMethod ( vo , "get" , cpmd , section , failMsg , failures ) ... | validate ConfigProperties type |
14,785 | private static void containGetOrIsMethod ( ValidateClass vo , String getOrIs , ConfigProperty cpmd , String section , String failMsg , List < Failure > failures ) throws NoSuchMethodException { String methodName = getOrIs + cpmd . getConfigPropertyName ( ) . getValue ( ) . substring ( 0 , 1 ) . toUpperCase ( Locale . U... | validated object contain get or is Method |
14,786 | protected org . ironjacamar . core . connectionmanager . listener . ConnectionListener getConnectionListener ( Credential credential ) throws ResourceException { org . ironjacamar . core . connectionmanager . listener . ConnectionListener result = null ; Exception failure = null ; boolean isInterrupted = Thread . inter... | Get a connection listener |
14,787 | private org . ironjacamar . core . connectionmanager . listener . ConnectionListener associateConnectionListener ( Credential credential , Object connection ) throws ResourceException { log . tracef ( "associateConnectionListener(%s, %s)" , credential , connection ) ; if ( isShutdown ( ) ) { throw new ResourceException... | Associate a ConnectionListener |
14,788 | private boolean shouldEnlist ( ConnectionListener cl ) { if ( cmConfiguration . isEnlistment ( ) && cl . getManagedConnection ( ) instanceof LazyEnlistableManagedConnection ) return false ; return true ; } | Should enlist the ConnectionListener |
14,789 | static WARClassLoader createWARClassLoader ( final Kernel kernel , final ClassLoader parent ) { return AccessController . doPrivileged ( new PrivilegedAction < WARClassLoader > ( ) { public WARClassLoader run ( ) { return new WARClassLoader ( kernel , parent ) ; } } ) ; } | Create a WARClassLoader |
14,790 | static WebAppClassLoader createWebAppClassLoader ( final ClassLoader cl , final WebAppContext wac ) { return AccessController . doPrivileged ( new PrivilegedAction < WebAppClassLoader > ( ) { public WebAppClassLoader run ( ) { try { return new WebAppClassLoader ( cl , wac ) ; } catch ( IOException ioe ) { return null ;... | Create a WebClassLoader |
14,791 | void generateRaCode ( Definition def ) { if ( def . isUseRa ( ) ) { generateClassCode ( def , "Ra" ) ; generateClassCode ( def , "RaMeta" ) ; } if ( def . isGenAdminObject ( ) ) { for ( int i = 0 ; i < def . getAdminObjects ( ) . size ( ) ; i ++ ) { generateMultiAdminObjectClassCode ( def , "AoImpl" , i ) ; generateMul... | generate resource adapter code |
14,792 | void generateOutboundCode ( Definition def ) { if ( def . isSupportOutbound ( ) ) { if ( def . getMcfDefs ( ) == null ) throw new IllegalStateException ( "Should define at least one mcf class" ) ; for ( int num = 0 ; num < def . getMcfDefs ( ) . size ( ) ; num ++ ) { generateMultiMcfClassCode ( def , "Mcf" , num ) ; ge... | generate outbound code |
14,793 | void generateInboundCode ( Definition def ) { if ( def . isSupportInbound ( ) ) { if ( def . isDefaultPackageInbound ( ) ) generateClassCode ( def , "Ml" , "inflow" ) ; generateClassCode ( def , "As" , "inflow" ) ; generateClassCode ( def , "Activation" , "inflow" ) ; generatePackageInfo ( def , "main" , "inflow" ) ; }... | generate inbound code |
14,794 | void generateMBeanCode ( Definition def ) { if ( def . isSupportOutbound ( ) ) { generateClassCode ( def , "MbeanInterface" , "mbean" ) ; generateClassCode ( def , "MbeanImpl" , "mbean" ) ; generatePackageInfo ( def , "main" , "mbean" ) ; } } | generate MBean code |
14,795 | void generateClassCode ( Definition def , String className , String subDir ) { if ( className == null || className . equals ( "" ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeGen" ; String javaFile = Definition . class . getMethod ( "get" + classN... | generate class code |
14,796 | void generateMultiMcfClassCode ( Definition def , String className , int num ) { if ( className == null || className . equals ( "" ) ) return ; if ( num < 0 || num + 1 > def . getMcfDefs ( ) . size ( ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeG... | generate multi mcf class code |
14,797 | void generateMultiAdminObjectClassCode ( Definition def , String className , int num ) { if ( className == null || className . equals ( "" ) ) return ; try { String clazzName = this . getClass ( ) . getPackage ( ) . getName ( ) + ".code." + className + "CodeGen" ; Class < ? > clazz = Class . forName ( clazzName , true ... | generate multi admin object class code |
14,798 | void generateAntIvyXml ( Definition def , String outputDir ) { try { FileWriter antfw = Utils . createFile ( "build.xml" , outputDir ) ; BuildIvyXmlGen bxGen = new BuildIvyXmlGen ( ) ; bxGen . generate ( def , antfw ) ; antfw . close ( ) ; FileWriter ivyfw = Utils . createFile ( "ivy.xml" , outputDir ) ; IvyXmlGen ixGe... | generate ant + ivy build . xml and ivy files |
14,799 | void generateGradle ( Definition def , String outputDir ) { try { FileWriter bgfw = Utils . createFile ( "build.gradle" , outputDir ) ; BuildGradleGen bgGen = new BuildGradleGen ( ) ; bgGen . generate ( def , bgfw ) ; bgfw . close ( ) ; } catch ( IOException ioe ) { ioe . printStackTrace ( ) ; } } | generate gradle build . gradle |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.