Java Code Examples for javax.annotation.Resource

The following examples show how to use javax.annotation.Resource. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: bamboobsc   Source File: WorkspaceServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="bsc.dao.WorkspaceDAO")
@Required		
public void setWorkspaceDAO(
		IWorkspaceDAO<BbWorkspace, String> workspaceDAO) {
	this.workspaceDAO = workspaceDAO;
}
 
Example 2
Source Project: bamboobsc   Source File: DataSourceConfManagementAction.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="qcharts.service.DataSourceConfService")
@Required	
public void setDataSourceConfService(
		IDataSourceConfService<DataSourceConfVO, QcDataSourceConf, String> dataSourceConfService) {
	this.dataSourceConfService = dataSourceConfService;
}
 
Example 3
@Autowired
@Resource(name="core.service.SysExpressionService")
@Required		
public void setSysExpressionService(
		ISysExpressionService<SysExpressionVO, TbSysExpression, String> sysExpressionService) {
	this.sysExpressionService = sysExpressionService;
}
 
Example 4
Source Project: cxf   Source File: NettyHttpServerEngineFactory.java    License: Apache License 2.0 5 votes vote down vote up
/**
 * This call is used to set the bus. It should only be called once.
 *
 * @param bus
 */
@Resource(name = "cxf")
public final void setBus(Bus bus) {
    this.bus = bus;
    if (bus != null) {
        bus.setExtension(this, NettyHttpServerEngineFactory.class);
        lifeCycleManager = bus.getExtension(BusLifeCycleManager.class);
        if (null != lifeCycleManager) {
            lifeCycleManager.registerLifeCycleListener(this);
        }
    }
}
 
Example 5
Source Project: bamboobsc   Source File: DataQueryLogicServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="qcharts.service.DataSourceDriverService")
@Required			
public void setDataSourceDriverService(
		IDataSourceDriverService<DataSourceDriverVO, QcDataSourceDriver, String> dataSourceDriverService) {
	this.dataSourceDriverService = dataSourceDriverService;
}
 
Example 6
Source Project: bamboobsc   Source File: ObjectivesDashboardAction.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Required
@Resource(name="bsc.service.VisionService")	
public void setVisionService(
		IVisionService<VisionVO, BbVision, String> visionService) {
	this.visionService = visionService;
}
 
Example 7
@Autowired
@Resource(name="core.service.SysFormTemplateService")	
@Required
public void setSysFormTemplateService(
		ISysFormTemplateService<SysFormTemplateVO, TbSysFormTemplate, String> sysFormTemplateService) {
	this.sysFormTemplateService = sysFormTemplateService;
}
 
Example 8
Source Project: bamboobsc   Source File: KpiOrgaServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="bsc.dao.KpiOrgaDAO")
@Required		
public void setKpiOrgaDAO(
		IKpiOrgaDAO<BbKpiOrga, String> kpiOrgaDAO) {
	this.kpiOrgaDAO = kpiOrgaDAO;
}
 
Example 9
@Autowired
@Resource(name="core.service.SysIconService")
@Required			
public void setSysIconService(
		ISysIconService<SysIconVO, TbSysIcon, String> sysIconService) {
	this.sysIconService = sysIconService;
}
 
Example 10
Source Project: bamboobsc   Source File: OrganizationLogicServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="bsc.service.TsaMeasureFreqService")
@Required		
public void setTsaMeasureFreqService(
		ITsaMeasureFreqService<TsaMeasureFreqVO, BbTsaMeasureFreq, String> tsaMeasureFreqService) {
	this.tsaMeasureFreqService = tsaMeasureFreqService;
}
 
Example 11
Source Project: bamboobsc   Source File: AnalyticsConfigLogicServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="qcharts.service.OlapConfService")
@Required		
public void setOlapConfService(
		IOlapConfService<OlapConfVO, QcOlapConf, String> olapConfService) {
	this.olapConfService = olapConfService;
}
 
Example 12
@Resource
public void setTestBean2(TestBean testBean2) {
	if (this.testBean2 != null) {
		throw new IllegalStateException("Already called");
	}
	this.testBean2 = testBean2;
}
 
Example 13
Source Project: bamboobsc   Source File: SystemTemplateLogicServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="core.service.SysTemplateService")	
@Required
public void setSysTemplateService(
		ISysTemplateService<SysTemplateVO, TbSysTemplate, String> sysTemplateService) {
	this.sysTemplateService = sysTemplateService;
}
 
Example 14
Source Project: bamboobsc   Source File: RoleLogicServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="core.service.SysCodeService")
@Required		
public void setSysCodeService(
		ISysCodeService<SysCodeVO, TbSysCode, String> sysCodeService) {
	this.sysCodeService = sysCodeService;
}
 
Example 15
Source Project: bamboobsc   Source File: PdcaDocServiceImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Autowired
@Resource(name="bsc.dao.PdcaDocDAO")
@Required		
public void setPdcaDocDAO(
		IPdcaDocDAO<BbPdcaDoc, String> pdcaDocDAO) {
	this.pdcaDocDAO = pdcaDocDAO;
}
 
Example 16
Source Project: lemon   Source File: AuthDeployer.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setAccessManager(AccessManager accessManager) {
    this.accessManager = accessManager;
}
 
Example 17
Source Project: lemon   Source File: ModelInfoController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setExportor(Exportor exportor) {
    this.exportor = exportor;
}
 
Example 18
Source Project: bamboobsc   Source File: TsaManagementAction.java    License: Apache License 2.0 4 votes vote down vote up
@Autowired
@Resource(name="bsc.service.TsaMeasureFreqService")
@Required		
public void setTsaMeasureFreqService(ITsaMeasureFreqService<TsaMeasureFreqVO, BbTsaMeasureFreq, String> tsaMeasureFreqService) {
	this.tsaMeasureFreqService = tsaMeasureFreqService;
}
 
Example 19
Source Project: lemon   Source File: PartyResource.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setPartyTypeManager(PartyTypeManager partyTypeManager) {
    this.partyTypeManager = partyTypeManager;
}
 
Example 20
Source Project: lemon   Source File: OssService.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setOssObjectManager(OssObjectManager ossObjectManager) {
    this.ossObjectManager = ossObjectManager;
}
 
Example 21
Source Project: lemon   Source File: MeetingRestController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setMeetingRoomManager(MeetingRoomManager meetingRoomManager) {
    this.meetingRoomManager = meetingRoomManager;
}
 
Example 22
Source Project: lemon   Source File: PimPhraseController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setPimPhraseManager(PimPhraseManager pimPhraseManager) {
    this.pimPhraseManager = pimPhraseManager;
}
 
Example 23
Source Project: bamboobsc   Source File: TsaManagementAction.java    License: Apache License 2.0 4 votes vote down vote up
@Autowired
@Required
@Resource(name="bsc.service.OrganizationService")		
public void setOrganizationService(IOrganizationService<OrganizationVO, BbOrganization, String> organizationService) {
	this.organizationService = organizationService;
}
 
Example 24
Source Project: OA   Source File: PaymentPlanAction.java    License: GNU General Public License v3.0 4 votes vote down vote up
@Resource
public void setSalesAgreementService(SalesAgreementService salesAgreementService) {
	this.salesAgreementService = salesAgreementService;
}
 
Example 25
Source Project: lemon   Source File: DatabaseInternalUserConnector.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setAccountAvatarManager(
        AccountAvatarManager accountAvatarManager) {
    this.accountAvatarManager = accountAvatarManager;
}
 
Example 26
@Resource
public void setPurchaseOrderRegisiterService(PurchaseOrderRegisiterService PurchaseOrderRegisiterService) {
	this.PurchaseOrderRegisiterService = PurchaseOrderRegisiterService;
}
 
Example 27
Source Project: lemon   Source File: AuthSysController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setPermManager(PermManager permManager) {
    this.permManager = permManager;
}
 
Example 28
Source Project: lemon   Source File: AccessBatchController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setAuthService(AuthService authService) {
    this.authService = authService;
}
 
Example 29
Source Project: ArchUnit   Source File: ExamplesIntegrationTest.java    License: Apache License 2.0 4 votes vote down vote up
@TestFactory
Stream<DynamicTest> CodingRulesTest() {
    ExpectedTestFailures expectFailures = ExpectedTestFailures
            .forTests(
                    com.tngtech.archunit.exampletest.CodingRulesTest.class,
                    com.tngtech.archunit.exampletest.junit4.CodingRulesTest.class,
                    com.tngtech.archunit.exampletest.junit5.CodingRulesTest.class);

    expectFailures.ofRule("no classes should access standard streams");
    expectAccessToStandardStreams(expectFailures);
    expectFailures.times(2);

    expectFailures.ofRule("no classes should throw generic exceptions");
    expectThrownGenericExceptions(expectFailures);

    expectFailures.ofRule("no classes should use java.util.logging")
            .by(callFromStaticInitializer(ClassViolatingCodingRules.class)
                    .setting().field(ClassViolatingCodingRules.class, "log")
                    .inLine(9));

    expectFailures.ofRule("fields that have raw type java.util.logging.Logger should be private " +
            "and should be static and should be final, because we agreed on this convention")
            .by(ExpectedField.of(ClassViolatingCodingRules.class, "log").doesNotHaveModifier(JavaModifier.PRIVATE))
            .by(ExpectedField.of(ClassViolatingCodingRules.class, "log").doesNotHaveModifier(JavaModifier.FINAL));

    expectFailures.ofRule("no classes should use JodaTime, because modern Java projects use the [java.time] API instead")
            .by(callFromMethod(ClassViolatingCodingRules.class, "jodaTimeIsBad")
                    .toMethod(org.joda.time.DateTime.class, "now")
                    .inLine(31)
                    .asDependency())
            .by(method(ClassViolatingCodingRules.class, "jodaTimeIsBad")
                    .withReturnType(org.joda.time.DateTime.class));

    expectFailures.ofRule("no classes should use field injection, because field injection is considered harmful; "
            + "use constructor injection or setter injection instead; see https://stackoverflow.com/q/39890849 for detailed explanations")
            .by(ExpectedField.of(ClassViolatingInjectionRules.class, "badBecauseAutowiredField").beingAnnotatedWith(Autowired.class))
            .by(ExpectedField.of(ClassViolatingInjectionRules.class, "badBecauseValueField").beingAnnotatedWith(Value.class))
            .by(ExpectedField.of(ClassViolatingInjectionRules.class, "badBecauseJavaxInjectField").beingAnnotatedWith(javax.inject.Inject.class))
            .by(ExpectedField.of(ClassViolatingInjectionRules.class, "badBecauseComGoogleInjectField").beingAnnotatedWith(com.google.inject.Inject.class))
            .by(ExpectedField.of(ClassViolatingInjectionRules.class, "badBecauseResourceField").beingAnnotatedWith(Resource.class));

    expectFailures.ofRule("no classes should access standard streams and no classes should throw generic exceptions");
    expectAccessToStandardStreams(expectFailures);
    expectThrownGenericExceptions(expectFailures);

    return expectFailures.toDynamicTests();
}
 
Example 30
Source Project: lemon   Source File: AccountAvatarController.java    License: Apache License 2.0 4 votes vote down vote up
@Resource
public void setStoreClient(StoreClient storeClient) {
    this.storeClient = storeClient;
}