0001: package com.calipso.reportgenerator.common;
0002:
0003: import com.calipso.reportgenerator.common.ReportGeneratorConfiguration;
0004: import com.calipso.reportgenerator.common.RemoteReportManager;
0005: import com.calipso.reportgenerator.enterprise.common.ReportManagerSLHome;
0006: import com.calipso.reportgenerator.enterprise.common.ReportManagerSL;
0007: import com.calipso.reportgenerator.reportdefinitions.ReportView;
0008: import com.calipso.reportgenerator.reportdefinitions.ReportDefinition;
0009: import com.calipso.reportgenerator.reportdefinitions.ReportSourceDefinition;
0010: import com.calipso.reportgenerator.reportcalculator.Matrix;
0011: import java.rmi.RemoteException;
0012: import java.util.*;
0013: import java.text.MessageFormat;
0014: import javax.naming.Context;
0015: import javax.naming.InitialContext;
0016:
0017: /**
0018: * Se crea solo cuando el EJB es de tipo Stateless.
0019: * Representa la capa entre el cliente y la aplicacion,
0020: * y presenta los metodos que el cliente podra invocar correspondientes al ReportManager
0021: * agregandole el throws InfoException por el contexto en el que se ejecuta.
0022: * @see com.calipso.reportgenerator.reportmanager.ReportManager
0023: *
0024: */
0025:
0026: public class RemoteReportManagerStateLess extends RemoteReportManager {
0027:
0028: private ReportManagerSL reportManagerRemote;
0029: private String clientIp;
0030:
0031: /**
0032: * Obtiene un ReportManagerSF.
0033: * @return el ReportManagerRemote correspondiente a la instancia de RemoteReportManagerStateFul
0034: */
0035: public ReportManagerSL getReportManagerRemote()
0036: throws InfoException {
0037: if (reportManagerRemote == null) {
0038: reportManagerRemote = newReportManagerRemote();
0039: }
0040: return reportManagerRemote;
0041: }
0042:
0043: /**
0044: * Crea un nuevo ReportManagerRemote, dicha instancia
0045: * servira para invocar los metodos heredados
0046: * @return el ReportManagerSF correspondiente de la instancia RemoteReportManagerStateful
0047: * @throws com.calipso.reportgenerator.common.InfoException
0048: */
0049: private ReportManagerSL newReportManagerRemote()
0050: throws InfoException {
0051: // Hashtable env = System.getProperties();
0052: // System.setProperty("org.omg.CORBA.ORBInitialHost",getReportGeneratorConfiguration().getDistributedHost());
0053: Hashtable env = getEnviroment();
0054: try {
0055: Context ctx = new InitialContext(env);
0056: Object obj = ctx.lookup(getReportGeneratorConfiguration()
0057: .getReportManagerEJB_SLName());
0058: ReportManagerSLHome home = (ReportManagerSLHome) javax.rmi.PortableRemoteObject
0059: .narrow(obj, ReportManagerSLHome.class);
0060: ReportManagerSL reportManager = home.create();
0061: return reportManager;
0062: } catch (Exception e) {
0063: throw new InfoException(LanguageTraslator.traslate("88"), e);
0064: }
0065: }
0066:
0067: public RemoteReportManagerStateLess(
0068: ReportGeneratorConfiguration reportGeneratorConfiguration,
0069: String distributedHost) {
0070: super (reportGeneratorConfiguration, distributedHost);
0071: }
0072:
0073: public int PrepareReport(String reportDefId, Map paramValues)
0074: throws InfoException {
0075: try {
0076: return getReportManagerRemote().PrepareReport(
0077: getReportGeneratorConfiguration(), reportDefId,
0078: paramValues);
0079: } catch (RemoteException e) {
0080: throw new InfoException(
0081: MessageFormat
0082: .format(
0083: (LanguageTraslator.traslate("87")),
0084: new Object[] { "RemoteReportManagerStateless-PrepareReport(String reportDefId, Map paramValues)" }),
0085: e);
0086: }
0087: }
0088:
0089: public int PrepareReport(String reportDefinitionID)
0090: throws InfoException {
0091: try {
0092: return getReportManagerRemote().PrepareReport(
0093: getReportGeneratorConfiguration(),
0094: reportDefinitionID);
0095: } catch (RemoteException e) {
0096: throw new InfoException(
0097: MessageFormat
0098: .format(
0099: (LanguageTraslator.traslate("87")),
0100: new Object[] { "RemoteReportManagerStateless-PrepareReport(String reportDefinitionID)" }),
0101: e);
0102: }
0103: };
0104:
0105: public void ReleaseReport(int handle) throws InfoException {
0106: try {
0107: getReportManagerRemote().ReleaseReport(
0108: getReportGeneratorConfiguration(), handle);
0109: } catch (RemoteException e) {
0110: throw new InfoException(
0111: MessageFormat
0112: .format(
0113: (LanguageTraslator.traslate("87")),
0114: new Object[] { "RemoteReportManagerStateless-ReleaseReport(int handle)" }),
0115: e);
0116: }
0117: }
0118:
0119: public void prepareReportSource(String reportSourceDefinitionId)
0120: throws InfoException {
0121: try {
0122: getReportManagerRemote().prepareReportSource(
0123: getReportGeneratorConfiguration(),
0124: reportSourceDefinitionId);
0125: } catch (RemoteException e) {
0126: throw new InfoException(
0127: MessageFormat
0128: .format(
0129: (LanguageTraslator.traslate("87")),
0130: new Object[] { "RemoteReportManagerStateless-prepareReportSource(String reportSourceDefinitionId) " }),
0131: e);
0132: }
0133:
0134: }
0135:
0136: public Map getReportDefinitions() throws InfoException {
0137: try {
0138: return getReportManagerRemote().getReportDefinitions(
0139: getReportGeneratorConfiguration());
0140: } catch (RemoteException e) {
0141: throw new InfoException(
0142: MessageFormat
0143: .format(
0144: (LanguageTraslator.traslate("87")),
0145: new Object[] { "RemoteReportManagerStateless-getReportDefinitions() " }),
0146: e);
0147: }
0148: }
0149:
0150: public Map getReportSourceDefinitions() throws InfoException {
0151: try {
0152: return getReportManagerRemote().getReportSourceDefinitions(
0153: getReportGeneratorConfiguration());
0154: } catch (RemoteException e) {
0155: throw new InfoException(
0156: MessageFormat
0157: .format(
0158: (LanguageTraslator.traslate("87")),
0159: new Object[] { "RemoteReportManagerStateless-getReportSourceDefinitions() " }),
0160: e);
0161: }
0162: }
0163:
0164: public Map getReportsForEntity(String entityID)
0165: throws InfoException {
0166: try {
0167: return getReportManagerRemote().getReportsForEntity(
0168: getReportGeneratorConfiguration(), entityID);
0169: } catch (RemoteException e) {
0170: throw new InfoException(
0171: MessageFormat
0172: .format(
0173: (LanguageTraslator.traslate("87")),
0174: new Object[] { "RemoteReportManagerStateless-getReportsForEntity(String entityID) " }),
0175: e);
0176: }
0177: }
0178:
0179: public void ExecuteAction(int handle, String actionName,
0180: Object params) throws InfoException {
0181: try {
0182: getReportManagerRemote().ExecuteAction(
0183: getReportGeneratorConfiguration(), handle,
0184: actionName, params);
0185: } catch (RemoteException e) {
0186: throw new InfoException(
0187: MessageFormat
0188: .format(
0189: (LanguageTraslator.traslate("87")),
0190: new Object[] { "RemoteReportManagerStateless-ExecuteAction(int handle, String actionName, Object params) " }),
0191: e);
0192: }
0193: }
0194:
0195: public void saveReportDefinition(ReportDefinition reportDefinition)
0196: throws InfoException {
0197: try {
0198: getReportManagerRemote()
0199: .saveReportDefinition(
0200: getReportGeneratorConfiguration(),
0201: reportDefinition);
0202: } catch (RemoteException e) {
0203: throw new InfoException(
0204: MessageFormat
0205: .format(
0206: (LanguageTraslator.traslate("87")),
0207: new Object[] { "RemoteReportManagerStateless-saveReportDefinition(ReportDefinition reportDefinition) " }),
0208: e);
0209: }
0210: }
0211:
0212: public void saveReportSourceDefinition(
0213: ReportSourceDefinition reportSourceDefinition)
0214: throws InfoException {
0215: try {
0216: getReportManagerRemote().saveReportSourceDefinition(
0217: getReportGeneratorConfiguration(),
0218: reportSourceDefinition);
0219: } catch (RemoteException e) {
0220: throw new InfoException(
0221: MessageFormat
0222: .format(
0223: (LanguageTraslator.traslate("87")),
0224: new Object[] { "RemoteReportManagerStateless-saveReportSourceDefinition(ReportSourceDefinition reportSourceDefinition) " }),
0225: e);
0226: }
0227: }
0228:
0229: public void invalidateReportSource(String reportSourceDefinitionId)
0230: throws InfoException {
0231: try {
0232: getReportManagerRemote().invalidateReportSource(
0233: getReportGeneratorConfiguration(),
0234: reportSourceDefinitionId);
0235: } catch (RemoteException e) {
0236: throw new InfoException(
0237: MessageFormat
0238: .format(
0239: (LanguageTraslator.traslate("87")),
0240: new Object[] { "RemoteReportManagerStateless-invalidateReportSource(String reportSourceDefinitionId) " }),
0241: e);
0242: }
0243: }
0244:
0245: public ReportQuery getReportQuery(int handle) throws InfoException {
0246: try {
0247: return getReportManagerRemote().getReportQuery(
0248: getReportGeneratorConfiguration(), handle);
0249: } catch (RemoteException e) {
0250: throw new InfoException(
0251: MessageFormat
0252: .format(
0253: (LanguageTraslator.traslate("87")),
0254: new Object[] { "RemoteReportManagerStateless-getReportQuery(int handle) " }),
0255: e);
0256: }
0257: }
0258:
0259: public ReportQuery getDefaultReportQuery(int handle)
0260: throws InfoException {
0261: try {
0262: return getReportManagerRemote().getDefaultReportQuery(
0263: getReportGeneratorConfiguration(), handle);
0264: } catch (RemoteException e) {
0265: throw new InfoException(
0266: MessageFormat
0267: .format(
0268: (LanguageTraslator.traslate("87")),
0269: new Object[] { "RemoteReportManagerStateless-getDefaultReportQuery(int handle) " }),
0270: e);
0271: }
0272: }
0273:
0274: public ReportQuery getReportQuery(String reportDefinitionId)
0275: throws InfoException {
0276: try {
0277: return getReportManagerRemote().getReportQuery(
0278: getReportGeneratorConfiguration(),
0279: reportDefinitionId);
0280: } catch (RemoteException e) {
0281: throw new InfoException(
0282: MessageFormat
0283: .format(
0284: (LanguageTraslator.traslate("87")),
0285: new Object[] { "RemoteReportManagerStateless-getReportQuery(String reportDefinitionId) " }),
0286: e);
0287: }
0288: }
0289:
0290: public ReportQuery getDefaultReportQuery(String reportDefinitionId)
0291: throws InfoException {
0292: try {
0293: return getReportManagerRemote().getDefaultReportQuery(
0294: getReportGeneratorConfiguration(),
0295: reportDefinitionId);
0296: } catch (RemoteException e) {
0297: throw new InfoException(
0298: MessageFormat
0299: .format(
0300: (LanguageTraslator.traslate("87")),
0301: new Object[] { "RemoteReportManagerStateless-getDefaultReportQuery(String reportDefinitionId) " }),
0302: e);
0303: }
0304: }
0305:
0306: public ReportResult ExecReportQuery(int handle, Map paramValues)
0307: throws InfoException {
0308: try {
0309: return getReportManagerRemote().ExecReportQuery(
0310: getReportGeneratorConfiguration(), handle,
0311: paramValues);
0312: } catch (RemoteException e) {
0313: throw new InfoException(
0314: MessageFormat
0315: .format(
0316: (LanguageTraslator.traslate("87")),
0317: new Object[] { "RemoteReportManagerStateless-ExecReportQuery(int handle, Map paramValues)" }),
0318: e);
0319: }
0320: }
0321:
0322: public ReportResult ExecReportQuery(int handle, ReportQuery query)
0323: throws InfoException {
0324: try {
0325: return getReportManagerRemote().ExecReportQuery(
0326: getReportGeneratorConfiguration(), handle, query);
0327: } catch (RemoteException e) {
0328: throw new InfoException(
0329: MessageFormat
0330: .format(
0331: (LanguageTraslator.traslate("87")),
0332: new Object[] { "RemoteReportManagerStateless-ExecReportQuery(int handle, ReportQuery query)" }),
0333: e);
0334: }
0335: }
0336:
0337: public ReportResult ExecReportQuery(String reportDefinitionID,
0338: Map paramValues) throws InfoException {
0339: try {
0340: return getReportManagerRemote().ExecReportQuery(
0341: getReportGeneratorConfiguration(),
0342: reportDefinitionID, paramValues);
0343: } catch (RemoteException e) {
0344: throw new InfoException(
0345: MessageFormat
0346: .format(
0347: (LanguageTraslator.traslate("87")),
0348: new Object[] { "RemoteReportManagerStateless-ExecReportQuery(String reportDefinitionID, Map paramValues) " }),
0349: e);
0350: }
0351: }
0352:
0353: public ReportResult ExecReportQuery(String reportDefinitionID,
0354: ReportQuery query) throws InfoException {
0355: try {
0356: return getReportManagerRemote().ExecReportQuery(
0357: getReportGeneratorConfiguration(),
0358: reportDefinitionID, query);
0359: } catch (RemoteException e) {
0360: throw new InfoException(
0361: MessageFormat
0362: .format(
0363: (LanguageTraslator.traslate("87")),
0364: new Object[] { "RemoteReportManagerStateless-ExecReportQuery(String reportDefinitionID, ReportQuery query)" }),
0365: e);
0366: }
0367: }
0368:
0369: public ReportQuery getDefaultReportQuery(int handle, String userID)
0370: throws InfoException {
0371: try {
0372: return getReportManagerRemote().getDefaultReportQuery(
0373: getReportGeneratorConfiguration(), handle, userID);
0374: } catch (RemoteException e) {
0375: throw new InfoException(
0376: MessageFormat
0377: .format(
0378: (LanguageTraslator.traslate("87")),
0379: new Object[] { "RemoteReportManagerStateless-getDefaultReportQuery(int handle,String userID)" }),
0380: e);
0381: }
0382: };
0383:
0384: public Map getReportViews(String reportDefinitionID, String userID)
0385: throws InfoException {
0386: try {
0387: return getReportManagerRemote().getReportViews(
0388: getReportGeneratorConfiguration(),
0389: reportDefinitionID, userID);
0390: } catch (RemoteException e) {
0391: throw new InfoException(
0392: MessageFormat
0393: .format(
0394: (LanguageTraslator.traslate("87")),
0395: new Object[] { "RemoteReportManagerStateless-getReportViews(String reportDefinitionID, String userID)" }),
0396: e);
0397: }
0398: };
0399:
0400: public Map getReportViews(String reportDefinitionID)
0401: throws InfoException {
0402: try {
0403: return getReportManagerRemote().getReportViews(
0404: getReportGeneratorConfiguration(),
0405: reportDefinitionID);
0406: } catch (RemoteException e) {
0407: throw new InfoException(
0408: MessageFormat
0409: .format(
0410: (LanguageTraslator.traslate("87")),
0411: new Object[] { "RemoteReportManagerStateless-getReportViews(String reportDefinitionID)" }),
0412: e);
0413: }
0414: };
0415:
0416: public ReportResult ExecReportQuery(int handle, String reportViewId)
0417: throws InfoException {
0418: try {
0419: return getReportManagerRemote().ExecReportQuery(
0420: getReportGeneratorConfiguration(), handle,
0421: reportViewId);
0422: } catch (RemoteException e) {
0423: throw new InfoException(
0424: MessageFormat
0425: .format(
0426: (LanguageTraslator.traslate("87")),
0427: new Object[] { "RemoteReportManagerStateless-ExecReportQuery(int handle, String reportViewId)" }),
0428: e);
0429: }
0430: };
0431:
0432: public ReportSpec getReportSpec(String reportDefinitionId,
0433: String reportSourceDefId) throws InfoException {
0434: try {
0435: return getReportManagerRemote().getReportSpec(
0436: getReportGeneratorConfiguration(),
0437: reportDefinitionId, reportSourceDefId);
0438: } catch (RemoteException e) {
0439: throw new InfoException(
0440: MessageFormat
0441: .format(
0442: (LanguageTraslator.traslate("87")),
0443: new Object[] { "RemoteReportManagerStateLess-getReportSpec(String reportDefinitionId, String reportSourceDefId)" }),
0444: e);
0445: }
0446: }
0447:
0448: public ReportSpec getReportSpec(ReportDefinition reportDefinition,
0449: ReportSourceDefinition reportSourceDef)
0450: throws InfoException {
0451: try {
0452: return getReportManagerRemote().getReportSpec(
0453: getReportGeneratorConfiguration(),
0454: reportDefinition, reportSourceDef);
0455: } catch (RemoteException e) {
0456: throw new InfoException(
0457: MessageFormat
0458: .format(
0459: (LanguageTraslator.traslate("87")),
0460: new Object[] { "getReportSpec(ReportDefinition reportDefinition, ReportSourceDefinition reportSourceDef)" }),
0461: e);
0462: }
0463: }
0464:
0465: public ReportSpec getReportSpec(String reportDefinitionId)
0466: throws InfoException {
0467: try {
0468: return getReportManagerRemote().getReportSpec(
0469: getReportGeneratorConfiguration(),
0470: reportDefinitionId);
0471: } catch (RemoteException e) {
0472: throw new InfoException(
0473: MessageFormat
0474: .format(
0475: (LanguageTraslator.traslate("87")),
0476: new Object[] { "RemoteReportManagerStateLess-getReportSpec(String reportDefinitionId)" }),
0477: e);
0478: }
0479: }
0480:
0481: public ReportView getReportView(String reportViewId)
0482: throws InfoException {
0483: try {
0484: return getReportManagerRemote().getReportView(
0485: getReportGeneratorConfiguration(), reportViewId);
0486: } catch (RemoteException e) {
0487: throw new InfoException(
0488: MessageFormat
0489: .format(
0490: (LanguageTraslator.traslate("87")),
0491: new Object[] { "RemoteReportManagerStateLess-getReportView(String reportViewId)" }),
0492: e);
0493: }
0494: }
0495:
0496: public void saveReportView(ReportView reportView)
0497: throws InfoException {
0498: try {
0499: getReportManagerRemote().saveReportView(
0500: getReportGeneratorConfiguration(), reportView);
0501: } catch (RemoteException e) {
0502: throw new InfoException(
0503: MessageFormat
0504: .format(
0505: (LanguageTraslator.traslate("87")),
0506: new Object[] { "RemoteReportManagerStateLess-saveReportView(ReportView reportView)" }),
0507: e);
0508: }
0509: }
0510:
0511: public ReportView getReportViewFromID(String id,
0512: String reportDefinitionId, String userId)
0513: throws InfoException {
0514: try {
0515: return getReportManagerRemote().getReportViewFromID(
0516: getReportGeneratorConfiguration(), id,
0517: reportDefinitionId, userId);
0518: } catch (RemoteException e) {
0519: throw new InfoException(
0520: MessageFormat
0521: .format(
0522: (LanguageTraslator.traslate("87")),
0523: new Object[] { "RemoteReportManagerStateLess-getReportViewFromID(String id, String reportDefinitionId, String userId)" }),
0524: e);
0525: }
0526: }
0527:
0528: public ReportResult ExecReportQuery(int handle,
0529: ReportView reportView) throws InfoException {
0530: try {
0531: return getReportManagerRemote().ExecReportQuery(
0532: getReportGeneratorConfiguration(), handle,
0533: reportView);
0534: } catch (RemoteException e) {
0535: throw new InfoException(
0536: MessageFormat
0537: .format(
0538: (LanguageTraslator.traslate("87")),
0539: new Object[] { "RemoteReportManagerStateLess-ExecReportQuery(int handle, ReportView reportView)" }),
0540: e);
0541: }
0542: }
0543:
0544: public void registerDefinitions() throws InfoException {
0545: try {
0546: getReportManagerRemote().registerDefinitions(
0547: getReportGeneratorConfiguration());
0548: } catch (RemoteException e) {
0549: throw new InfoException(
0550: MessageFormat
0551: .format(
0552: (LanguageTraslator.traslate("87")),
0553: new Object[] { "RemoteReportManagerStateLess-registerDefinitions()" }),
0554: e);
0555: }
0556: }
0557:
0558: public void deleteAllRepositories() throws InfoException {
0559: try {
0560: getReportManagerRemote().deleteAllRepositories(
0561: getReportGeneratorConfiguration());
0562: } catch (RemoteException e) {
0563: throw new InfoException(
0564: MessageFormat
0565: .format(
0566: (LanguageTraslator.traslate("87")),
0567: new Object[] { "RemoteReportManagerStateLess-deleteAllRepositories()" }),
0568: e);
0569: }
0570: }
0571:
0572: public void deleteAllDefinitions() throws InfoException {
0573: try {
0574: getReportManagerRemote().deleteAllDefinitions(
0575: getReportGeneratorConfiguration());
0576: } catch (RemoteException e) {
0577: throw new InfoException(
0578: MessageFormat
0579: .format(
0580: (LanguageTraslator.traslate("87")),
0581: new Object[] { "RemoteReportManagerStateLess-deleteAllDefinitions()" }),
0582: e);
0583: }
0584: }
0585:
0586: public void deleteReportSourceRepository() throws InfoException {
0587: try {
0588: getReportManagerRemote().deleteReportSourceRepository(
0589: getReportGeneratorConfiguration());
0590: } catch (RemoteException e) {
0591: throw new InfoException(
0592: MessageFormat
0593: .format(
0594: (LanguageTraslator.traslate("87")),
0595: new Object[] { "RemoteReportManagerStateLess-deleteReportSourceRepository()" }),
0596: e);
0597: }
0598: }
0599:
0600: public void deleteReportSourceDefinitionRepository()
0601: throws InfoException {
0602: try {
0603: getReportManagerRemote()
0604: .deleteReportSourceDefinitionRepository(
0605: getReportGeneratorConfiguration());
0606: } catch (RemoteException e) {
0607: throw new InfoException(
0608: MessageFormat
0609: .format(
0610: (LanguageTraslator.traslate("87")),
0611: new Object[] { "RemoteReportManagerStateLess-deleteReportSourceDefinitionRepository()" }),
0612: e);
0613: }
0614: }
0615:
0616: public void deleteReportDefinitionRepository() throws InfoException {
0617: try {
0618: getReportManagerRemote().deleteReportDefinitionRepository(
0619: getReportGeneratorConfiguration());
0620: } catch (RemoteException e) {
0621: throw new InfoException(
0622: MessageFormat
0623: .format(
0624: (LanguageTraslator.traslate("87")),
0625: new Object[] { "RemoteReportManagerStateLess-deleteReportDefinitionRepository()" }),
0626: e);
0627: }
0628: }
0629:
0630: public void deleteReportViewRepository() throws InfoException {
0631: try {
0632: getReportManagerRemote().deleteReportViewRepository(
0633: getReportGeneratorConfiguration());
0634: } catch (RemoteException e) {
0635: throw new InfoException(
0636: MessageFormat
0637: .format(
0638: (LanguageTraslator.traslate("87")),
0639: new Object[] { "RemoteReportManagerStateLess-deleteReportViewRepository()" }),
0640: e);
0641: }
0642: }
0643:
0644: public void deleteReportView(String id, String reportDefinitionId,
0645: String userId) throws InfoException {
0646: try {
0647: getReportManagerRemote().deleteReportView(
0648: getReportGeneratorConfiguration(), id,
0649: reportDefinitionId, userId);
0650: } catch (RemoteException e) {
0651: throw new InfoException(
0652: MessageFormat
0653: .format(
0654: (LanguageTraslator.traslate("87")),
0655: new Object[] { "RemoteReportManagerStateLess-deleteReportView(String id, String reportDefinitionId, String userId)" }),
0656: e);
0657: }
0658: }
0659:
0660: public void deleteReportSource(String reportSourceDefinitionId)
0661: throws InfoException {
0662: try {
0663: getReportManagerRemote().deleteReportSource(
0664: getReportGeneratorConfiguration(),
0665: reportSourceDefinitionId);
0666: } catch (RemoteException e) {
0667: throw new InfoException(
0668: MessageFormat
0669: .format(
0670: (LanguageTraslator.traslate("87")),
0671: new Object[] { "RemoteReportManagerStateLess-deleteReportSource(String reportSourceDefinitionId)" }),
0672: e);
0673: }
0674: }
0675:
0676: public void deleteReportSourceDefinition(
0677: String reportSourceDefinitionID) throws InfoException {
0678: try {
0679: getReportManagerRemote().deleteReportSourceDefinition(
0680: getReportGeneratorConfiguration(),
0681: reportSourceDefinitionID);
0682: } catch (RemoteException e) {
0683: throw new InfoException(
0684: MessageFormat
0685: .format(
0686: (LanguageTraslator.traslate("87")),
0687: new Object[] { "RemoteReportManagerStateLess-deleteReportSourceDefinition(String reportSourceDefinitionID)" }),
0688: e);
0689: }
0690: }
0691:
0692: public void deleteReportDefinition(String reportDefinitionID)
0693: throws InfoException {
0694: try {
0695: getReportManagerRemote().deleteReportDefinition(
0696: getReportGeneratorConfiguration(),
0697: reportDefinitionID);
0698: } catch (RemoteException e) {
0699: throw new InfoException(
0700: MessageFormat
0701: .format(
0702: (LanguageTraslator.traslate("87")),
0703: new Object[] { "RemoteReportManagerStateLess-deleteReportDefinition(String reportDefinitionID)" }),
0704: e);
0705: }
0706: }
0707:
0708: public void assingDefaultView(String id, String reportDefinitionId,
0709: String userId) throws InfoException {
0710: try {
0711: getReportManagerRemote().assingDefaultView(
0712: getReportGeneratorConfiguration(), id,
0713: reportDefinitionId, userId);
0714: } catch (RemoteException e) {
0715: throw new InfoException(
0716: MessageFormat
0717: .format(
0718: (LanguageTraslator.traslate("87")),
0719: new Object[] { "RemoteReportManagerStateLess-assingDefaultView(String id, String reportDefinitionId, String userId)" }),
0720: e);
0721: }
0722: }
0723:
0724: public ReportResult ExecReportQuery(MicroReport microReport)
0725: throws InfoException {
0726: try {
0727: return getReportManagerRemote().ExecReportQuery(
0728: getReportGeneratorConfiguration(), microReport);
0729: } catch (RemoteException e) {
0730: throw new InfoException(
0731: MessageFormat
0732: .format(
0733: (LanguageTraslator.traslate("87")),
0734: new Object[] { "RemoteReportManagerStateLess-ExecReportQuery(MicroReport microReport)" }),
0735: e);
0736: }
0737: }
0738:
0739: public int PrepareReport(MicroReport microReport)
0740: throws InfoException {
0741: try {
0742: return getReportManagerRemote().PrepareReport(
0743: getReportGeneratorConfiguration(), microReport);
0744: } catch (RemoteException e) {
0745: throw new InfoException(
0746: MessageFormat
0747: .format(
0748: (LanguageTraslator.traslate("87")),
0749: new Object[] { "RemoteReportManagerStateLess-PrepareReport(MicroReport microReport)" }),
0750: e);
0751: }
0752: }
0753:
0754: public String getXML(int handle) throws InfoException {
0755: try {
0756: return getReportManagerRemote().getXML(
0757: getReportGeneratorConfiguration(), handle);
0758: } catch (RemoteException e) {
0759: throw new InfoException(
0760: MessageFormat
0761: .format(
0762: (LanguageTraslator.traslate("87")),
0763: new Object[] { "RemoteReportManagerStateLess-getXML(int handle)" }),
0764: e);
0765: }
0766:
0767: }
0768:
0769: public String getXML(String reportDefinitionID, Map paramValues)
0770: throws InfoException {
0771: try {
0772: return getReportManagerRemote().getXML(
0773: getReportGeneratorConfiguration(),
0774: reportDefinitionID, paramValues);
0775: } catch (RemoteException e) {
0776: throw new InfoException(
0777: MessageFormat
0778: .format(
0779: (LanguageTraslator.traslate("87")),
0780: new Object[] { "RemoteReportManagerStateLess-getXML(String reportDefinitionID, Map paramValues)" }),
0781: e);
0782: }
0783: }
0784:
0785: public Set getDimensionValues(int handle, String name)
0786: throws InfoException {
0787: try {
0788: return getReportManagerRemote().getDimensionValues(
0789: getReportGeneratorConfiguration(), handle, name);
0790: } catch (RemoteException e) {
0791: throw new InfoException(
0792: MessageFormat
0793: .format(
0794: (LanguageTraslator.traslate("87")),
0795: new Object[] { "RemoteReportManagerStateLess-getDimensionValues(int handle, String name)" }),
0796: e);
0797: }
0798:
0799: }
0800:
0801: public Set getDimensionValues(String reportDefinitionID,
0802: Map paramValues, String name) throws InfoException {
0803: try {
0804: return getReportManagerRemote().getDimensionValues(
0805: getReportGeneratorConfiguration(),
0806: reportDefinitionID, paramValues, name);
0807: } catch (RemoteException e) {
0808: throw new InfoException(
0809: MessageFormat
0810: .format(
0811: (LanguageTraslator.traslate("87")),
0812: new Object[] { "RemoteReportManagerStateLess-getDimensionValues(String reportDefinitionID, Map paramValues, String name)" }),
0813: e);
0814: }
0815: }
0816:
0817: public Vector getUpdatedDataModel(int handle, int mode, int row,
0818: int col, boolean isDistributed) throws InfoException {
0819: try {
0820: return getReportManagerRemote().getUpdatedDataModel(
0821: getReportGeneratorConfiguration(), handle, mode,
0822: row, col, isDistributed);
0823: } catch (RemoteException e) {
0824: throw new InfoException(
0825: MessageFormat
0826: .format(
0827: (LanguageTraslator.traslate("87")),
0828: new Object[] { "RemoteReportManagerStateLess-getUpdatedDataModel(int handle, int mode, int row, int col, boolean isDistributed) " }),
0829: e);
0830: }
0831: }
0832:
0833: public Matrix getMatrix(int handle) throws InfoException {
0834: try {
0835: return getReportManagerRemote().getMatrix(
0836: getReportGeneratorConfiguration(), handle);
0837: } catch (RemoteException e) {
0838: throw new InfoException(
0839: MessageFormat
0840: .format(
0841: (LanguageTraslator.traslate("87")),
0842: new Object[] { "RemoteReportManagerStateLess-getMatrix(int handle) " }),
0843: e);
0844: }
0845: }
0846:
0847: public ReportDefinition getReportDefinitionFromID(
0848: String reportDefinitionId) throws InfoException {
0849: try {
0850: return getReportManagerRemote().getReportDefinitionFromID(
0851: getReportGeneratorConfiguration(),
0852: reportDefinitionId);
0853: } catch (RemoteException e) {
0854: throw new InfoException(
0855: MessageFormat
0856: .format(
0857: (LanguageTraslator.traslate("87")),
0858: new Object[] { "RemoteReportManagerStateLess-getReportDefinitionFromID(String reportDefinitionId) " }),
0859: e);
0860: }
0861: }
0862:
0863: public ReportSourceDefinition getReportSourceDefinitionFromID(
0864: String reportSourceDefinitionId) throws InfoException {
0865: try {
0866: return getReportManagerRemote()
0867: .getReportSourceDefinitionFromID(
0868: getReportGeneratorConfiguration(),
0869: reportSourceDefinitionId);
0870: } catch (RemoteException e) {
0871: throw new InfoException(
0872: MessageFormat
0873: .format(
0874: (LanguageTraslator.traslate("87")),
0875: new Object[] { "RemoteReportManagerStateLess-getReportSourceDefinitionFromID(String reportSourceDefinitionId) " }),
0876: e);
0877: }
0878: }
0879:
0880: public void init(
0881: ReportGeneratorConfiguration reportGeneratorConfiguration)
0882: throws InfoException {
0883: }
0884:
0885: public boolean validateUser(String userName, String password,
0886: String userRepositoryPath) throws InfoException {
0887: try {
0888: return getReportManagerRemote().validateUser(
0889: getReportGeneratorConfiguration(), userName,
0890: password, userRepositoryPath);
0891: } catch (RemoteException e) {
0892: throw new InfoException(
0893: MessageFormat
0894: .format(
0895: (LanguageTraslator.traslate("87")),
0896: new Object[] { "RemoteReportManagerStateLess-validateUser()) " }),
0897: e);
0898: }
0899: }
0900:
0901: public boolean validateRol(String[] roles, String userName,
0902: String rolRepositoryPath) throws InfoException {
0903: try {
0904: return getReportManagerRemote().validateRol(
0905: getReportGeneratorConfiguration(), roles, userName,
0906: rolRepositoryPath);
0907: } catch (RemoteException e) {
0908: throw new InfoException(
0909: MessageFormat
0910: .format(
0911: (LanguageTraslator.traslate("87")),
0912: new Object[] { "RemoteReportManagerStateLess-validateRol()) " }),
0913: e);
0914: }
0915: }
0916:
0917: public void exportReport(String userName, String password,
0918: String userRepositoryPath, String reportDefinitionId,
0919: Map paramValues, boolean isLandscape, int type,
0920: String destinationPath, String name) throws InfoException {
0921: try {
0922: getReportManagerRemote().exportReport(
0923: getReportGeneratorConfiguration(), userName,
0924: password, userRepositoryPath, reportDefinitionId,
0925: paramValues, isLandscape, type, destinationPath,
0926: name);
0927: } catch (RemoteException e) {
0928: throw new InfoException(
0929: MessageFormat
0930: .format(
0931: (LanguageTraslator.traslate("87")),
0932: new Object[] { "RemoteReportManagerStateLess-exportReport()) " }),
0933: e);
0934: }
0935:
0936: }
0937:
0938: public byte[] exportReport(Map params) throws InfoException {
0939: try {
0940: return getReportManagerRemote().exportReport(
0941: getReportGeneratorConfiguration(), params);
0942: } catch (RemoteException e) {
0943: throw new InfoException(
0944: MessageFormat
0945: .format(
0946: (LanguageTraslator.traslate("87")),
0947: new Object[] { "RemoteReportManagerStateLess-exportReport()) " }),
0948: e);
0949: }
0950: }
0951:
0952: public boolean addNewUser(String rootPasswd, String userName,
0953: String password, String userRepositoryPath)
0954: throws InfoException {
0955: try {
0956: return getReportManagerRemote().addNewUser(
0957: getReportGeneratorConfiguration(), rootPasswd,
0958: userName, password, userRepositoryPath);
0959: } catch (RemoteException e) {
0960: throw new InfoException(
0961: MessageFormat
0962: .format(
0963: (LanguageTraslator.traslate("87")),
0964: new Object[] { "RemoteReportManagerStateLess-addNewUser()) " }),
0965: e);
0966: }
0967: }
0968:
0969: public void addUserData(String userName, String name,
0970: String company, String userDataRepositoryPath)
0971: throws InfoException {
0972: try {
0973: getReportManagerRemote().addUserData(
0974: getReportGeneratorConfiguration(), userName, name,
0975: company, userDataRepositoryPath);
0976: } catch (RemoteException e) {
0977: throw new InfoException(
0978: MessageFormat
0979: .format(
0980: (LanguageTraslator.traslate("87")),
0981: new Object[] { "RemoteReportManagerStateLess-addUserData()) " }),
0982: e);
0983: }
0984: }
0985:
0986: public void addUserRol(String userName, String rol,
0987: String rolsRepositoryPath) throws InfoException {
0988: try {
0989: getReportManagerRemote().addUserRol(
0990: getReportGeneratorConfiguration(), userName, rol,
0991: rolsRepositoryPath);
0992: } catch (RemoteException e) {
0993: throw new InfoException(
0994: MessageFormat
0995: .format(
0996: (LanguageTraslator.traslate("87")),
0997: new Object[] { "RemoteReportManagerStateLess-addUserRol()) " }),
0998: e);
0999: }
1000: }
1001:
1002: public boolean isAcceptedLicence() throws InfoException {
1003: try {
1004: return getReportManagerRemote().isAcceptedLicence(
1005: getReportGeneratorConfiguration());
1006: } catch (RemoteException e) {
1007: throw new InfoException(
1008: MessageFormat
1009: .format(
1010: (LanguageTraslator.traslate("87")),
1011: new Object[] { "RemoteReportManagerStateLess-isAcceptedLicence())) " }),
1012: e);
1013: }
1014: }
1015:
1016: public void acceptedLicence(boolean value) throws InfoException {
1017: try {
1018: getReportManagerRemote().acceptedLicence(
1019: getReportGeneratorConfiguration(), value);
1020: } catch (RemoteException e) {
1021: throw new InfoException(
1022: MessageFormat
1023: .format(
1024: (LanguageTraslator.traslate("87")),
1025: new Object[] { "RemoteReportManagerStateLess-acceptedLicence())) " }),
1026: e);
1027: }
1028: }
1029:
1030: public MicroReport getMicroReport(String fileName)
1031: throws InfoException {
1032: try {
1033: return getReportManagerRemote().getMicroReport(
1034: getReportGeneratorConfiguration(), fileName);
1035: } catch (RemoteException e) {
1036: throw new InfoException(
1037: MessageFormat
1038: .format(
1039: (LanguageTraslator.traslate("87")),
1040: new Object[] { "RemoteReportManagerStateLess-getMicroReport()) " }),
1041: e);
1042: }
1043: }
1044:
1045: public MicroReport getMicroReport(String reportDefinitionId,
1046: Map param) throws InfoException {
1047: try {
1048: return getReportManagerRemote().getMicroReport(
1049: getReportGeneratorConfiguration(),
1050: reportDefinitionId, param);
1051: } catch (RemoteException e) {
1052: throw new InfoException(
1053: MessageFormat
1054: .format(
1055: (LanguageTraslator.traslate("87")),
1056: new Object[] { "RemoteReportManagerStateLess-getMicroReport()) " }),
1057: e);
1058: }
1059: }
1060:
1061: public Collection getUserData(String userId,
1062: String userDataRepositoryPath) throws InfoException {
1063: try {
1064: return getReportManagerRemote().getUserData(
1065: getReportGeneratorConfiguration(), userId,
1066: userDataRepositoryPath);
1067: } catch (RemoteException e) {
1068: throw new InfoException(
1069: MessageFormat
1070: .format(
1071: (LanguageTraslator.traslate("87")),
1072: new Object[] { "RemoteReportManagerStateLess-getUserData()) " }),
1073: e);
1074: }
1075: }
1076:
1077: public void logClientData(String clientData) throws InfoException {
1078: try {
1079: getReportManagerRemote().logClientData(
1080: getReportGeneratorConfiguration(), clientData);
1081: } catch (RemoteException e) {
1082: throw new InfoException(
1083: MessageFormat
1084: .format(
1085: (LanguageTraslator.traslate("87")),
1086: new Object[] { "RemoteReportManagerStateLess-logClientData()) " }),
1087: e);
1088: }
1089: }
1090:
1091: /* public ZipOutputStream getMicroReport(int reportHandle, ReportView reportView, String userID, String fileName) throws InfoException {
1092: try {
1093: return getReportManagerRemote().getMicroReport(reportHandle,reportView,userID,fileName);
1094: }
1095: catch (RemoteException e) {
1096: throw new InfoException(MessageFormat.format((LanguageTraslator.traslate("87")), new Object[]{"RemoteReportManagerStateLess-getMicroReport(int reportHandle, ReportView reportView, String userID, String fileName)"}), e);
1097: }
1098: }
1099: */
1100: public Vector registerReportSourceDefinitions(Vector vector)
1101: throws InfoException {
1102: try {
1103: return getReportManagerRemote()
1104: .registerReportSourceDefinitions(
1105: getReportGeneratorConfiguration(), vector);
1106: } catch (RemoteException e) {
1107: throw new InfoException(
1108: MessageFormat
1109: .format(
1110: (LanguageTraslator.traslate("87")),
1111: new Object[] { "RemoteReportManagerStateLess-registerReportSourceDefinitions()" }),
1112: e);
1113: }
1114: }
1115:
1116: public Vector registerReportDefinitions(Vector vector)
1117: throws InfoException {
1118: try {
1119: return getReportManagerRemote().registerReportDefinitions(
1120: getReportGeneratorConfiguration(), vector);
1121: } catch (RemoteException e) {
1122: throw new InfoException(
1123: MessageFormat
1124: .format(
1125: (LanguageTraslator.traslate("87")),
1126: new Object[] { "RemoteReportManagerStateLess-registerReportDefinitions()" }),
1127: e);
1128: }
1129: }
1130:
1131: public Vector registerReportViews(Vector vector)
1132: throws InfoException {
1133: try {
1134: return getReportManagerRemote().registerReportViews(
1135: getReportGeneratorConfiguration(), vector);
1136: } catch (RemoteException e) {
1137: throw new InfoException(
1138: MessageFormat
1139: .format(
1140: (LanguageTraslator.traslate("87")),
1141: new Object[] { "RemoteReportManagerStateLess-registerReportViews()" }),
1142: e);
1143: }
1144: }
1145:
1146: public String getDefaultReportViewId(String reportDefinitionId,
1147: String userId) throws InfoException {
1148: try {
1149: return getReportManagerRemote().getDefaultReportViewId(
1150: getReportGeneratorConfiguration(),
1151: reportDefinitionId, userId);
1152: } catch (RemoteException e) {
1153: throw new InfoException(
1154: MessageFormat
1155: .format(
1156: (LanguageTraslator.traslate("87")),
1157: new Object[] { "RemoteReportManagerStateLess-getDefaultReportViewId(String reportDefinitionId, String userId)" }),
1158: e);
1159: }
1160: }
1161:
1162: }
|