@Test(expected = IllegalStateException.class) public void testMutateFromInDifferentThread() throws Exception { final VitamSession session1 = new VitamSession(new VitamThreadFactory.VitamThread(null, 0)); final VitamSession session2 = new VitamSession(new VitamThreadFactory.VitamThread(null, 0)); session1.mutateFrom(session2); }
public void mutateFrom(@NotNull VitamSession newSession) { if (newSession == null) { throw new IllegalArgumentException("VitamSession should not be null"); } setRequestId(newSession.getRequestId()); setInternalRequestId(newSession.getInternalRequestId()); setTenantId(newSession.getTenantId()); setContractId(newSession.getContractId()); setContract(newSession.getContract()); setOther(newSession.getOther()); setContextId(newSession.getContextId()); setApplicationSessionId(newSession.getApplicationSessionId()); setSecurityProfileIdentifier(newSession.getSecurityProfileIdentifier()); setPersonalCertificate(newSession.getPersonalCertificate()); }
VitamSession { public void mutateFrom(@NotNull VitamSession newSession) { if (newSession == null) { throw new IllegalArgumentException("VitamSession should not be null"); } setRequestId(newSession.getRequestId()); setInternalRequestId(newSession.getInternalRequestId()); setTenantId(newSession.getTenantId()); setContractId(newSession.getContractId()); setContract(newSession.getContract()); setOther(newSession.getOther()); setContextId(newSession.getContextId()); setApplicationSessionId(newSession.getApplicationSessionId()); setSecurityProfileIdentifier(newSession.getSecurityProfileIdentifier()); setPersonalCertificate(newSession.getPersonalCertificate()); } }
VitamSession { public void mutateFrom(@NotNull VitamSession newSession) { if (newSession == null) { throw new IllegalArgumentException("VitamSession should not be null"); } setRequestId(newSession.getRequestId()); setInternalRequestId(newSession.getInternalRequestId()); setTenantId(newSession.getTenantId()); setContractId(newSession.getContractId()); setContract(newSession.getContract()); setOther(newSession.getOther()); setContextId(newSession.getContextId()); setApplicationSessionId(newSession.getApplicationSessionId()); setSecurityProfileIdentifier(newSession.getSecurityProfileIdentifier()); setPersonalCertificate(newSession.getPersonalCertificate()); } VitamSession(VitamThreadFactory.VitamThread owningThread); }
VitamSession { public void mutateFrom(@NotNull VitamSession newSession) { if (newSession == null) { throw new IllegalArgumentException("VitamSession should not be null"); } setRequestId(newSession.getRequestId()); setInternalRequestId(newSession.getInternalRequestId()); setTenantId(newSession.getTenantId()); setContractId(newSession.getContractId()); setContract(newSession.getContract()); setOther(newSession.getOther()); setContextId(newSession.getContextId()); setApplicationSessionId(newSession.getApplicationSessionId()); setSecurityProfileIdentifier(newSession.getSecurityProfileIdentifier()); setPersonalCertificate(newSession.getPersonalCertificate()); } VitamSession(VitamThreadFactory.VitamThread owningThread); static VitamSession from(VitamSession origin); Object getOther(); VitamSession setOther(Object other); String getRequestId(); void setRequestId(String newRequestId); void setInternalRequestId(String newRequestId); String getInternalRequestId(); Integer getTenantId(); void setTenantId(Integer newTenantId); void setRequestId(GUID guid); String getContractId(); void setContractId(String contractId); AccessContractModel getContract(); void setContract(AccessContractModel contract); String getContextId(); void setContextId(String contextId); String getSecurityProfileIdentifier(); void setSecurityProfileIdentifier(String securityProfileIdentifier); String getApplicationSessionId(); void setApplicationSessionId(String applicationSessionId); String getPersonalCertificate(); void setPersonalCertificate(String personalCertificate); void mutateFrom(@NotNull VitamSession newSession); void erase(); void checkValidRequestId(); void initIfAbsent(Integer tenantId); @Override String toString(); }
VitamSession { public void mutateFrom(@NotNull VitamSession newSession) { if (newSession == null) { throw new IllegalArgumentException("VitamSession should not be null"); } setRequestId(newSession.getRequestId()); setInternalRequestId(newSession.getInternalRequestId()); setTenantId(newSession.getTenantId()); setContractId(newSession.getContractId()); setContract(newSession.getContract()); setOther(newSession.getOther()); setContextId(newSession.getContextId()); setApplicationSessionId(newSession.getApplicationSessionId()); setSecurityProfileIdentifier(newSession.getSecurityProfileIdentifier()); setPersonalCertificate(newSession.getPersonalCertificate()); } VitamSession(VitamThreadFactory.VitamThread owningThread); static VitamSession from(VitamSession origin); Object getOther(); VitamSession setOther(Object other); String getRequestId(); void setRequestId(String newRequestId); void setInternalRequestId(String newRequestId); String getInternalRequestId(); Integer getTenantId(); void setTenantId(Integer newTenantId); void setRequestId(GUID guid); String getContractId(); void setContractId(String contractId); AccessContractModel getContract(); void setContract(AccessContractModel contract); String getContextId(); void setContextId(String contextId); String getSecurityProfileIdentifier(); void setSecurityProfileIdentifier(String securityProfileIdentifier); String getApplicationSessionId(); void setApplicationSessionId(String applicationSessionId); String getPersonalCertificate(); void setPersonalCertificate(String personalCertificate); void mutateFrom(@NotNull VitamSession newSession); void erase(); void checkValidRequestId(); void initIfAbsent(Integer tenantId); @Override String toString();  }