Revision 22616 branches/v10/extensions/extPublish/src/org/gvsig/publish/serversmodel/RemoteResource.java
RemoteResource.java | ||
---|---|---|
48 | 48 |
import org.gvsig.publish.IPublishPersistence; |
49 | 49 |
import org.gvsig.publish.PublishLogger; |
50 | 50 |
import org.gvsig.publish.PublishRegister; |
51 |
import org.gvsig.publish.exceptions.LayerInfoNotAvailableException; |
|
52 | 51 |
import org.gvsig.publish.exceptions.PublishException; |
53 | 52 |
import org.gvsig.publish.infoproject.ILayerInfo; |
54 | 53 |
|
... | ... | |
84 | 83 |
* |
85 | 84 |
*/ |
86 | 85 |
public String getId(){ |
87 |
if (id == null){ |
|
88 |
try { |
|
89 |
this.id = getLayerInfo().getName(); |
|
90 |
} catch (LayerInfoNotAvailableException e) { |
|
91 |
PublishLogger.getLog().error("ERROR " + getClassName() + "Cannot generate a unique identifier", e); |
|
92 |
} |
|
86 |
if (id == null){ |
|
87 |
this.id = getLayerInfo().getName(); |
|
93 | 88 |
} |
94 | 89 |
return id; |
95 | 90 |
} |
... | ... | |
110 | 105 |
return this.service; |
111 | 106 |
} |
112 | 107 |
/** |
108 |
* Preconditions: exists information about the layer. The availability of the information is checked when a |
|
109 |
* project information is set to the publication |
|
113 | 110 |
* |
114 | 111 |
* @return the layer which represents this remote resource. I can be null if the remote resource has not a layerinfo associated. |
115 |
* @throws LayerInfoNotAvailableException |
|
116 |
* |
|
112 |
* |
|
117 | 113 |
*/ |
118 |
public ILayerInfo getLayerInfo() throws LayerInfoNotAvailableException{
|
|
114 |
public ILayerInfo getLayerInfo() { |
|
119 | 115 |
if (layerInfo == null){ |
120 |
layerInfo = getService().getServer().getPublication().getProjectInfo().findLayer(getId()); |
|
116 |
layerInfo = getService().getServer().getPublication().getProjectInfo().findLayer(getId());
|
|
121 | 117 |
} |
122 | 118 |
return this.layerInfo; |
123 | 119 |
} |
Also available in: Unified diff